Changeset 3390436
- Timestamp:
- 11/05/2025 12:15:14 PM (4 months ago)
- Location:
- wiser-review/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
wiser-review.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wiser-review/trunk/readme.txt
r3379720 r3390436 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 2. 68 Stable tag: 2.7 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 139 139 = 2.6 = 140 140 SEO-Friendly Product Reviews & Rich Snippet Display with UI Enhancements 141 142 = 2.7= 143 Fixed encoding and special character issues for Rich snippts, support added for international and domestic orders -
wiser-review/trunk/wiser-review.php
r3379720 r3390436 4 4 * Plugin URI: https://wiserreview.com 5 5 * Description: Wiser Review module helps you collect and display product reviews, star ratings, and nudges. It also automates review requests via email to boost custom engagement and conversions. 6 * Version: 2. 66 * Version: 2.7 7 7 * Author: Wiser Notify 8 8 * Requires Plugins: woocommerce … … 22 22 define( 'WISERRW_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 23 23 define( 'WISERRW_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 24 define( 'WISERRW_PLUGIN_VERSION', 2. 6);24 define( 'WISERRW_PLUGIN_VERSION', 2.7); 25 25 define( 'WISERRW_API_HOST', 'https://api.wiserreview.com/api/woocommerce/' ); 26 26 … … 692 692 $date_created = $order->get_date_created(); 693 693 $wiserrw_order_data['cdt'] = $date_created ? $date_created->format('Y-m-d H:i:s') : current_time('mysql'); 694 695 /* Shipping Details */ 696 $country = $order->get_shipping_country(); 697 $state = $order->get_shipping_state(); 698 // Fallback to billing if shipping not available 699 if ( empty( $country ) ) { 700 $country = $order->get_billing_country(); 701 } 702 if ( empty( $state ) ) { 703 $state = $order->get_billing_state(); 704 } 694 705 695 706 /* Customer Details */ … … 698 709 $customer_data['first_name'] = $order->get_billing_first_name(); 699 710 $customer_data['last_name'] = $order->get_billing_last_name(); 711 712 // Address 713 $customer_data['cntry'] = $country; 714 $customer_data['state'] = $state; 715 700 716 $wiserrw_order_data['customer'] = $customer_data; 701 717 … … 875 891 if ( $fp ) { 876 892 if ( $is_first_chunk ) { 877 fputcsv( $fp, array('Order Id', 'First Name', 'Last Name', 'Phone', 'Email', ' Product Title', 'Product URL', 'Product Image URL', 'Product ID', 'Reviewer Image URL', 'Order Date' ) );893 fputcsv( $fp, array('Order Id', 'First Name', 'Last Name', 'Phone', 'Email', 'Country', 'State', 'Product Title', 'Product URL', 'Product Image URL', 'Product ID', 'Reviewer Image URL', 'Order Date' ) ); 878 894 } 879 895 880 896 foreach ( $chunk_ids as $order) { 881 897 $order_id = $order->get_id(); 882 883 898 $user_id = $order->get_user_id(); 899 900 901 $country = $order->get_shipping_country(); 902 $state = $order->get_shipping_state(); 903 904 // Fallback to billing if shipping not available 905 if ( empty( $country ) ) { 906 $country = $order->get_billing_country(); 907 } 908 if ( empty( $state ) ) { 909 $state = $order->get_billing_state(); 910 } 911 884 912 /* Product Details */ 885 913 $items = $order->get_items(); … … 907 935 $order->get_billing_phone(), 908 936 $order->get_billing_email(), 937 $country, 938 $state, 909 939 $product->get_name(), 910 940 $url, … … 1022 1052 ? $order->get_date_created()->format('Y-m-d H:i:s') // ✅ Clean date format 1023 1053 : current_time('mysql'); 1054 1055 /* Shipping Details */ 1056 $country = $order->get_shipping_country(); 1057 $state = $order->get_shipping_state(); 1058 1059 // Fallback to billing if shipping not available 1060 1061 if ( empty( $country ) ) { 1062 $country = $order->get_billing_country(); 1063 } 1064 if ( empty( $state ) ) { 1065 $state = $order->get_billing_state(); 1066 } 1067 1068 1024 1069 1025 1070 /* Customer Details */ … … 1029 1074 'first_name' => $order->get_billing_first_name(), 1030 1075 'last_name' => $order->get_billing_last_name(), 1076 1031 1077 ); 1078 1079 $wiserrw_order_data['cntry'] = $country; 1080 $wiserrw_order_data['state'] = $state; 1032 1081 $wiserrw_order_data['customer'] = $customer_data; 1033 1082 … … 2075 2124 // ✅ Save or delete only once, after loop 2076 2125 if ( $reviewCount > 0 ) { 2077 update_post_meta( $p_id, 'wiserrw_schema_json', json_encode( $schema_array, JSON_UNESCAPED_ SLASHES ) );2126 update_post_meta( $p_id, 'wiserrw_schema_json', json_encode( $schema_array, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES ) ); 2078 2127 } else { 2079 2128 delete_post_meta( $p_id, 'wiserrw_schema_json' );
Note: See TracChangeset
for help on using the changeset viewer.