Changeset 1953598
- Timestamp:
- 10/08/2018 11:05:48 PM (7 years ago)
- Location:
- recomendo/trunk
- Files:
-
- 5 edited
-
README.txt (modified) (1 diff)
-
recomendo-client.php (modified) (14 diffs)
-
recomendo-plugin.php (modified) (53 diffs)
-
recomendo.php (modified) (2 diffs)
-
uninstall.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
recomendo/trunk/README.txt
r1945381 r1953598 125 125 126 126 == Changelog == 127 = 1.0.1 = 128 * Bug fixes 129 127 130 = 1.0.0 = 128 131 * Option for excluding older items -
recomendo/trunk/recomendo-client.php
r1945379 r1953598 9 9 const TIMEOUT = 3; 10 10 const HTTPVERSION = '1.1'; 11 const AUTH_URL = 'https://auth.recomendo.ai/v1/auth';12 const EVENTS_URL = 'https://events.recomendo.ai/v1/events';13 const PREDICTIONS_URL = 'https://predictions.recomendo.ai/v1/queries.json';11 const AUTH_URL = 'https://auth.recomendo.ai/v1/auth'; 12 const EVENTS_URL = 'https://events.recomendo.ai/v1/events'; 13 const PREDICTIONS_URL = 'https://predictions.recomendo.ai/v1/queries.json'; 14 14 15 15 … … 47 47 48 48 if (! $client_secret ) 49 $client_secret = $this->client_secret; 49 $client_secret = $this->client_secret; 50 50 51 51 if ( false === ( $token = get_transient( 'recomendo_token' ) ) ) { … … 64 64 $token = $body->payload->token; 65 65 set_transient( 'recomendo_token', $token , 3500 ); 66 } 66 } 67 67 } 68 68 … … 90 90 public function send_query( array $query ) { 91 91 $url = self::PREDICTIONS_URL; 92 92 93 93 $response = wp_remote_post( $url, 94 94 array( … … 331 331 332 332 $url = self::EVENTS_URL . '.json'; 333 333 334 334 $response = wp_remote_post( $url, 335 335 array( … … 348 348 ) 349 349 ); 350 350 351 351 return $response; 352 352 } … … 372 372 ); 373 373 374 return $response;374 return $response; 375 375 } 376 376 … … 384 384 */ 385 385 public function get_event($event_id) { 386 $url = self::EVENTS_URL . "/$event_id.json ?accessKey=$this->api_access_key";386 $url = self::EVENTS_URL . "/$event_id.json"; 387 387 388 388 $response = wp_remote_get( $url, … … 394 394 ); 395 395 396 return $response;396 return $response; 397 397 } 398 398 … … 411 411 412 412 $url = self::EVENTS_URL . ".json"; 413 413 414 414 $query_params = array(); 415 415 … … 443 443 if (! empty( $query_params) ) 444 444 $url .= '?' . http_build_query( $query_params ); 445 446 445 446 447 447 $response = wp_remote_get( $url, 448 448 array( … … 454 454 455 455 return $response; 456 456 457 457 } 458 458 … … 482 482 */ 483 483 public function send_train_request() { 484 484 485 485 if ( ! get_transient( 'recomendo_train_request_sent' ) ) { 486 486 487 487 $url = 'https://client.recomendo.ai/v1/train'; 488 488 … … 494 494 ) 495 495 ); 496 496 497 497 // It wasn't there, so regenerate the data and save the transient 498 498 set_transient( 'recomendo_train_request_sent', true, 1800 ); 499 500 } else { 499 500 } else { 501 501 // if transient exists we ignore sending train request, but record it as OK 502 502 $response = array( 'response' => array( 'code' => 200, 'message' => 'OK' ) ); 503 503 } 504 504 505 505 // Here we return the raw response! 506 506 return $response; -
recomendo/trunk/recomendo-plugin.php
r1945379 r1953598 25 25 26 26 public static function is_event_server_up() { 27 27 28 28 // static function - need to initialize client 29 29 $client = new Recomendo_Client(); 30 30 31 31 $response = $client->get_event_server_status(); 32 32 33 33 $status = wp_remote_retrieve_response_code( $response ); 34 34 if ( $status == 200 ) { … … 48 48 49 49 50 50 51 51 public static function is_prediction_server_up() { 52 52 53 53 $client = new Recomendo_Client(); 54 54 55 55 $response = $client->get_prediction_server_status(); 56 56 57 57 $status = wp_remote_retrieve_response_code( $response ); 58 58 if ( $status == 200 ) { … … 64 64 65 65 66 66 67 67 public function register() { 68 68 … … 83 83 // Record Buy Event 84 84 add_action( 'woocommerce_thankyou', array( $this, 'record_buy_event' ) ); 85 // Record category_pref 85 // Record category_pref 86 86 add_action( 'wp', array( $this, 'record_category_pref' ) ); 87 87 // Register and load the widget … … 90 90 add_shortcode( 'recomendo', array( $this, 'show_shortcode' ) ); 91 91 // Show recommendations in WooCommerce related products 92 if ( isset( $this->woo_options['woo_show_related'] ) ) 92 if ( isset( $this->woo_options['woo_show_related'] ) ) 93 93 add_filter( 'woocommerce_related_products', array( $this, 'show_related_products' ), 10, 1); 94 94 // Show recommendations in the cart … … 99 99 add_action( 'woocommerce_product_set_visibility', array( $this, 'add_item' ), 10, 1 ); 100 100 } 101 101 102 102 } //end of method 103 104 103 104 105 105 106 106 public function load_widget() { … … 108 108 } 109 109 110 111 110 111 112 112 public function detect_crawler() { 113 113 // User lowercase string for comparison. … … 118 118 // ignore requests from this wordpress server... cron or other plugins 119 119 if ( $_SERVER['SERVER_ADDR'] == $_SERVER['REMOTE_ADDR'] ) return TRUE; 120 121 if( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { 120 121 if( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { 122 122 $transient = 'recomendo_' . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $_SERVER['HTTP_X_FORWARDED_FOR'] ; 123 123 } else { … … 151 151 } 152 152 153 154 153 154 155 155 // Tracks non-registered users with cookies 156 156 public function set_cookie() { … … 162 162 $_COOKIE['recomendo-cookie-user'] = $uniq_id; 163 163 164 if( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { 164 if( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { 165 165 $transient = 'recomendo_' . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $_SERVER['HTTP_X_FORWARDED_FOR'] ; 166 166 } else { … … 182 182 } // end of method --> set_cookie 183 183 184 185 186 // Creates shortcode [recomendo] 184 185 186 // Creates shortcode [recomendo] 187 187 public function show_shortcode( $atts, $content=null ) { 188 188 189 189 $a = shortcode_atts( array( 190 190 'number' => 16, 191 191 'type' => 'personalized', 192 'template' => 'content-' . $this->options['post_type'] 192 'template' => 'content-' . $this->options['post_type'] 193 193 ), $atts ); 194 194 195 195 // get the slug and name from the shortcode template arg 196 196 $template = explode( '-', basename( $a['template'], '.php') ); 197 197 $template_slug = $template[0]; 198 198 $template_name = implode( '-', array_slice( $template, 1) ); 199 199 200 200 switch ( strtolower( $a['type'] ) ) { 201 201 case 'personalized' : … … 258 258 259 259 if ( $response != false and array_key_exists( 'itemScores', $response ) ) { 260 ob_start(); 260 ob_start(); 261 261 if ( class_exists( 'woocommerce' ) ) { 262 262 woocommerce_product_loop_start(); … … 266 266 setup_postdata( $GLOBALS['post'] =& $post_object ); 267 267 wc_get_template_part( $template_slug, $template_name ); 268 } 268 } 269 269 } 270 woocommerce_product_loop_end(); 270 woocommerce_product_loop_end(); 271 271 } else { 272 272 … … 277 277 // REPLACE by custom parameter 278 278 get_template_part( $template_slug, $template_name ); 279 } 279 } 280 280 } 281 281 282 282 } 283 283 284 wp_reset_postdata(); 284 wp_reset_postdata(); 285 285 $output = ob_get_clean(); 286 286 return $output; 287 287 } 288 289 288 289 290 290 } // end of method --> show_shortcode 291 291 … … 293 293 // Shows recommendations in the WooCommerce Related Products area 294 294 public function show_related_products( $args ) { 295 295 296 296 global $product; 297 297 … … 309 309 } // end of method --> show_related_products 310 310 311 311 312 312 // Shows recommendations in the WooCommerce Cart 313 313 public function show_cart_recommendations( $args = array() ) { … … 322 322 $args = wp_parse_args( $args, $defaults ); 323 323 324 324 325 325 if ( ! $woocommerce ) { 326 326 return; … … 365 365 woocommerce_product_loop_end(); 366 366 wp_reset_postdata(); 367 367 368 368 } 369 369 } // end of method --> show_cart_recommendations … … 374 374 public function get_excluded_items() { 375 375 376 if ( class_exists( 'woocommerce' ) && 377 $this->options['post_type'] == 'product' && 376 if ( class_exists( 'woocommerce' ) && 377 $this->options['post_type'] == 'product' && 378 378 isset( $this->woo_options['woo_exclude_outofstock'] ) ) { 379 379 … … 426 426 427 427 $query['blacklistItems'] = $this->get_excluded_items(); 428 429 if ( isset ( $this->general_options['expire_date'] ) && 428 429 if ( isset ( $this->general_options['expire_date'] ) && 430 430 $this->general_options['expire_date'] != 0 ) { 431 431 432 432 $after_date = date('c', strtotime('-' . $this->general_options['expire_date'] . ' days' ) ); 433 433 $query['dateRange'] = array( 434 434 'name' => 'published_date', 435 'after' => $after_date 435 'after' => $after_date 436 436 ); 437 438 } 437 438 } 439 439 440 440 $response = $this->client->send_query( $query ); … … 476 476 private function map_range_input_to_bias( $value ) { 477 477 if ( intval($value) == -1 ) return 0.0; // exclude 478 if ( intval($value) == 0 ) return 0.5; // less importance 478 if ( intval($value) == 0 ) return 0.5; // less importance 479 479 if ( intval($value) == 1 ) return 1.0; // neutral 480 480 if ( intval($value) == 2 ) return 1.5; // more importance 481 if ( intval($value) == 3) return -1.0; // Include only 481 if ( intval($value) == 3) return -1.0; // Include only 482 482 } 483 483 … … 493 493 494 494 $fields = array(); 495 495 496 496 if ( isset( $this->woo_options['woo_onsale_relevance'] ) ) { 497 498 $on_sale_bias = $this->map_range_input_to_bias( 497 498 $on_sale_bias = $this->map_range_input_to_bias( 499 499 $this->woo_options['woo_onsale_relevance'] ); 500 500 501 501 // we ignore neutral and dont add it to the query 502 502 if ( $on_sale_bias != 1.0 ) { 503 503 // less importance boost "no" instead 504 if ( $on_sale_bias == 0.5 ) { 504 if ( $on_sale_bias == 0.5 ) { 505 505 $on_sale_args = array( 506 506 'name' => 'is_on_sale', … … 515 515 ); 516 516 } 517 517 518 518 $fields[] = $on_sale_args; 519 519 } 520 521 } 522 520 521 } 522 523 523 if ( isset( $this->woo_options['woo_featured_relevance'] ) ) { 524 $featured_bias = $this->map_range_input_to_bias( 525 $this->woo_options['woo_featured_relevance'] ); 526 524 $featured_bias = $this->map_range_input_to_bias( 525 $this->woo_options['woo_featured_relevance'] ); 526 527 527 // we ignore neutral and dont add it to the query 528 528 if ( $featured_bias != 1.0 ) { … … 540 540 'bias' => $featured_bias 541 541 ); 542 542 543 543 } 544 544 545 545 $fields[] = $featured_args; 546 546 … … 548 548 549 549 } 550 550 551 551 $query = array( 552 552 'user' => $userid, … … 554 554 'fields' => $fields 555 555 ); 556 557 if ( isset ( $this->general_options['expire_date'] ) && 556 557 if ( isset ( $this->general_options['expire_date'] ) && 558 558 $this->general_options['expire_date'] != 0 ) { 559 559 560 560 $after_date = date('c', strtotime('-' . $this->general_options['expire_date'] . ' days' ) ); 561 561 $query['dateRange'] = array( 562 562 'name' => 'published_date', 563 'after' => $after_date 564 ); 563 'after' => $after_date 564 ); 565 565 } 566 566 567 567 $query['blacklistItems'] = $this->get_excluded_items(); 568 568 569 569 $response = $this->client->send_query( $query ); 570 570 … … 597 597 $result = false; 598 598 } 599 600 601 599 600 601 602 602 return $result; 603 603 … … 610 610 611 611 $fields = array(); 612 612 613 613 // Check if WPML is installed and get the id of the original language post (not translation) 614 614 if ( function_exists('icl_object_id') ) { … … 621 621 // Apply the Similar Categories Bias/Boost to the query 622 622 if ( isset( $this->general_options['similar_categories_relevance'] ) ) { 623 624 $same_categories_bias = $this->map_range_input_to_bias( 623 624 $same_categories_bias = $this->map_range_input_to_bias( 625 625 $this->general_options['similar_categories_relevance'] ); 626 626 627 627 // we ignore neutral and dont add it to the query 628 628 if ( $same_categories_bias != 1.0 ) { 629 629 630 630 $categories = array(); 631 631 … … 636 636 $terms = get_the_terms( $item, 'category' ); 637 637 } 638 638 639 639 if (is_array($terms) or is_object($terms)) { 640 640 foreach ($terms as $term) { 641 641 $categories[] = (string) $term->term_id; 642 642 } 643 643 644 644 $similar_categories_args = array( 645 645 'name' => 'categories', 646 646 'values' => $categories, 647 647 'bias' => $same_categories_bias 648 ); 649 648 ); 649 650 650 $fields[] = $similar_categories_args; 651 651 } 652 } 653 654 655 } 656 652 } 653 654 655 } 656 657 657 // Apply the Similar Tags Bias/Boost to the query 658 658 if ( isset( $this->general_options['similar_tags_relevance'] ) ) { 659 660 $same_tags_bias = $this->map_range_input_to_bias( 659 660 $same_tags_bias = $this->map_range_input_to_bias( 661 661 $this->general_options['similar_tags_relevance'] ); 662 662 663 663 // we ignore neutral and dont add it to the query 664 664 if ( $same_tags_bias != 1.0 ) { 665 665 666 666 $tags = array(); 667 667 … … 673 673 } 674 674 675 675 676 676 if (is_array($taglist) or is_object($taglist)) { 677 677 foreach ($taglist as $tagitem) { 678 678 $tags[] = (string) $tagitem->term_id; 679 679 } 680 680 681 681 $similar_tags_args = array( 682 682 'name' => 'tags', 683 683 'values' => $tags, 684 684 'bias' => $same_tags_bias 685 ); 686 685 ); 686 687 687 $fields[] = $similar_tags_args; 688 688 689 689 } 690 691 } 692 693 694 } 690 691 } 692 693 694 } 695 695 696 696 // Apply Boost-Bias to Items on Sale 697 697 if ( isset( $this->woo_options['woo_onsale_relevance'] ) ) { 698 698 699 $on_sale_bias = $this->map_range_input_to_bias( 699 $on_sale_bias = $this->map_range_input_to_bias( 700 700 $this->woo_options['woo_onsale_relevance'] ); 701 701 … … 703 703 if ( $on_sale_bias != 1.0 ) { 704 704 // less importance boost "no" instead 705 if ( $on_sale_bias == -99 ) {705 if ( $on_sale_bias == 0.5 ) { 706 706 $on_sale_args = array( 707 707 'name' => 'is_on_sale', … … 719 719 $fields[] = $on_sale_args; 720 720 } 721 722 } 723 721 722 } 723 724 724 // Apply Boost-Bias to Featured Items 725 725 if ( isset( $this->woo_options['woo_featured_relevance'] ) ) { 726 $featured_bias = $this->map_range_input_to_bias( 727 $this->woo_options['woo_featured_relevance'] ); 726 $featured_bias = $this->map_range_input_to_bias( 727 $this->woo_options['woo_featured_relevance'] ); 728 728 729 729 // we ignore neutral and dont add it to the query 730 730 if ( $featured_bias != 1.0 ) { 731 731 // less importance boost "no" instead 732 if ( $featured_bias == -99 ) {732 if ( $featured_bias == 0.5 ) { 733 733 $featured_args = array( 734 734 'name' => 'is_featured', … … 755 755 ); 756 756 757 if ( isset ( $this->general_options['expire_date'] ) && 757 if ( isset ( $this->general_options['expire_date'] ) && 758 758 $this->general_options['expire_date'] != 0 ) { 759 759 760 760 $after_date = date('c', strtotime('-' . $this->general_options['expire_date'] . ' days' ) ); 761 761 $query['dateRange'] = array( 762 762 'name' => 'published_date', 763 'after' => $after_date 763 'after' => $after_date 764 764 ); 765 765 766 766 } 767 767 … … 769 769 770 770 $response = $this->client->send_query( $query ); 771 771 772 772 773 773 // check that the response is not WP_error … … 800 800 $result = false; 801 801 } 802 802 803 803 804 804 return $result; … … 812 812 813 813 $fields = array(); 814 814 815 815 if ( isset( $this->woo_options['woo_onsale_relevance'] ) ) { 816 817 $on_sale_bias = $this->map_range_input_to_bias( 816 817 $on_sale_bias = $this->map_range_input_to_bias( 818 818 $this->woo_options['woo_onsale_relevance'] ); 819 819 … … 821 821 if ( $on_sale_bias != 1.0 ) { 822 822 // less importance boost "no" instead 823 if ( $on_sale_bias == -99 ) {823 if ( $on_sale_bias == 0.5 ) { 824 824 $on_sale_args = array( 825 825 'name' => 'is_on_sale', … … 838 838 } 839 839 840 } 840 } 841 841 842 842 if ( isset( $this->woo_options['woo_featured_relevance'] ) ) { 843 $featured_bias = $this->map_range_input_to_bias( 844 $this->woo_options['woo_featured_relevance'] ); 845 843 $featured_bias = $this->map_range_input_to_bias( 844 $this->woo_options['woo_featured_relevance'] ); 845 846 846 // we ignore neutral and dont add it to the query 847 847 if ( $featured_bias != 1.0 ) { 848 848 // less importance boost "no" instead 849 if ( $featured_bias == -99 ) {849 if ( $featured_bias == 0.5 ) { 850 850 $featured_args = array( 851 851 'name' => 'is_featured', … … 859 859 'bias' => $featured_bias 860 860 ); 861 861 862 862 } 863 863 864 864 $fields[] = $featured_args; 865 865 … … 867 867 868 868 } 869 869 870 870 $query = array( 871 871 'itemSet'=> $items, … … 876 876 $query['blacklistItems'] = $this->get_excluded_items(); 877 877 878 if ( isset ( $this->general_options['expire_date'] ) && 878 if ( isset ( $this->general_options['expire_date'] ) && 879 879 $this->general_options['expire_date'] != 0 ) { 880 880 881 881 $after_date = date('c', strtotime('-' . $this->general_options['expire_date'] . ' days' ) ); 882 882 $query['dateRange'] = array( 883 883 'name' => 'published_date', 884 'after' => $after_date 884 'after' => $after_date 885 885 ); 886 887 } 888 886 887 } 888 889 889 $response = $this->client->send_query( $query ); 890 890 … … 943 943 } 944 944 } // end of method --> add_user 945 946 945 946 947 947 // Add all users using background processing 948 948 public function add_all_users_background() { 949 949 950 950 $args = array( 951 951 'fields' => 'ids', … … 954 954 955 955 $user_ids = get_users( $args ); 956 956 957 957 // Array of WP_User objects. 958 958 959 959 foreach ( $user_ids as $id ) { 960 $this->bg_user_copy->push_to_queue( $id ); 961 } 962 960 $this->bg_user_copy->push_to_queue( $id ); 961 } 962 963 963 $this->bg_user_copy->save()->dispatch(); 964 964 965 965 } //end-of-method add_all_users_background() 966 966 … … 1050 1050 } // end of method --> add_item 1051 1051 1052 1053 1052 1053 1054 1054 public function add_all_items_background() { 1055 1055 1056 1056 //$options = get_option( 'recomendo_options ' ); 1057 1057 1058 1058 $args = array( 1059 1059 'post_type' => $this->options['post_type'], … … 1067 1067 1068 1068 $post_ids = get_posts( $args ); 1069 1069 1070 1070 foreach ($post_ids as $id) { 1071 1071 $this->bg_item_copy->push_to_queue( $id ); 1072 1072 } 1073 1073 1074 1074 $this->bg_item_copy->save()->dispatch(); 1075 1075 1076 1076 } //end-of-method add_all_items_background() 1077 1077 1078 1078 1079 1079 // delete item from Recomendo when Post status changes to not Published … … 1158 1158 } // end of method --> record_view_event 1159 1159 1160 1160 1161 1161 // Send category-pref 1162 1162 public function record_category_pref() { … … 1168 1168 1169 1169 if ( is_category() or is_tax() or is_tag() ) { 1170 1170 1171 1171 $queried_object = get_queried_object(); 1172 1172 1173 1173 $term_id = $queried_object->term_id ; 1174 1174 $term_type = $queried_object->name ; 1175 1176 1175 1176 1177 1177 if ( get_current_user_id() == 0 ) { 1178 1178 $userid = $_COOKIE['recomendo-cookie-user']; … … 1188 1188 global $sitepress; 1189 1189 $term_id = icl_object_id( $term_id , $term_type, true, $sitepress->get_default_language() ); 1190 } 1190 } 1191 1191 1192 1192 $response = $this->client->record_user_action('category_pref', $userid, $term_id); … … 1220 1220 $userid = get_current_user_id(); 1221 1221 } 1222 1222 1223 1223 1224 1224 // Check if registered user does not want user behaviour to be tracked … … 1264 1264 $userid = get_current_user_id(); 1265 1265 } 1266 1266 1267 1267 // Check if registered user does not want user behaviour to be tracked 1268 1268 if ( in_array( $userid, $this->get_excluded_users() ) ) return; … … 1315 1315 // Executed when all data is copied to eventserver 1316 1316 public function add_all_orders_background() { 1317 1317 1318 1318 $query_args = array( 1319 1319 'fields' => 'ids', … … 1327 1327 if ( sizeof( $order_ids ) > 0 ) { 1328 1328 foreach ( $order_ids as $id ) { 1329 $this->bg_order_copy->push_to_queue( $id ); 1329 $this->bg_order_copy->push_to_queue( $id ); 1330 1330 } 1331 1331 } 1332 1332 1333 1333 $this->bg_order_copy->save()->dispatch(); 1334 1334 1335 1335 } //end-of-method add_all_orders_background() 1336 1336 1337 1338 1337 1338 1339 1339 public function copy_data_to_eventserver() { 1340 1340 1341 1341 update_option( 'recomendo_data_saved_ok', true ); 1342 1342 1343 $this->add_all_users_background(); 1344 $this->add_all_items_background(); 1343 $this->add_all_users_background(); 1344 $this->add_all_items_background(); 1345 1345 if ( class_exists( 'woocommerce' ) && 1346 1346 $this->options['post_type'] == 'product' ) { 1347 1347 1348 1348 $this->add_all_orders_background(); 1349 1349 } -
recomendo/trunk/recomendo.php
r1945379 r1953598 5 5 * Description: Make your website smart with Artificial Intelligence recommendations. 6 6 * Author: Recomendo 7 * Version: 1.0. 07 * Version: 1.0.1 8 8 * Requires at least: 4.7 9 9 * Tested up to: 4.9.8 … … 45 45 if ( class_exists( 'Recomendo_Plugin' ) ) { 46 46 // launch the plugin 47 $recomendo = new Recomendo_Plugin( $options ); 48 47 $recomendo = new Recomendo_Plugin( $options ); 48 49 49 } 50 50 } -
recomendo/trunk/uninstall.php
r1931195 r1953598 6 6 } 7 7 8 // call api.recomendo.ai/wp_uninstall/9 $options = get_option( 'recomendo_api' );10 $response = wp_remote_post( 'https://api.recomendo.ai/wp-uninstall',11 array(12 'headers' => json_encode([13 'Content-Type' => 'application/json',14 'Authorization' => 'Basic ' . base64_encode(15 $options['username'] . ':' . $options['password']16 )17 ]),18 'body' => json_encode([19 'username' => $options['username']20 ])21 )22 );23 8 24 9 // remove Recomendo options … … 27 12 delete_option( 'recomendo_options' ); 28 13 delete_option( 'recomendo_woo_options' ); 29 delete_option('recomendo_data_saved_ok'); 30 14 delete_option( 'recomendo_data_saved_ok' ); 31 15 delete_transient( 'recomendo_token' ); 32 33 16 delete_post_meta_by_key( 'recomendo_exclude_metabox' ); 34 17
Note: See TracChangeset
for help on using the changeset viewer.