Changeset 3451339
- Timestamp:
- 02/01/2026 11:29:35 AM (2 months ago)
- Location:
- bookpod-author-tools
- Files:
-
- 11 edited
- 48 copied
-
tags/2.1.1/bookpod-author-tools.php (modified) (1 diff)
-
tags/2.1.1/bpat-book.php (modified) (2 diffs)
-
tags/2.1.1/languages/bookpod-author-tools-he_IL.po (modified) (1 diff)
-
tags/2.1.1/readme-he_IL.txt (modified) (1 diff)
-
tags/2.1.1/readme.txt (modified) (1 diff)
-
tags/2.1.1/trunk (copied) (copied from bookpod-author-tools/trunk)
-
tags/2.1.1/trunk/assets/bpat-admin.js (copied) (copied from bookpod-author-tools/trunk/assets/bpat-admin.js)
-
tags/2.1.1/trunk/assets/bpat-form.css (copied) (copied from bookpod-author-tools/trunk/assets/bpat-form.css)
-
tags/2.1.1/trunk/assets/bpat-form.js (copied) (copied from bookpod-author-tools/trunk/assets/bpat-form.js)
-
tags/2.1.1/trunk/bookpod-author-tools.php (copied) (copied from bookpod-author-tools/trunk/bookpod-author-tools.php) (1 diff)
-
tags/2.1.1/trunk/bpat-book.php (copied) (copied from bookpod-author-tools/trunk/bpat-book.php) (2 diffs)
-
tags/2.1.1/trunk/bpat-checkout-logic.js (copied) (copied from bookpod-author-tools/trunk/bpat-checkout-logic.js)
-
tags/2.1.1/trunk/bpat-order.php (copied) (copied from bookpod-author-tools/trunk/bpat-order.php) (3 diffs)
-
tags/2.1.1/trunk/bpat-warehouse-webhook-shielding.php (copied) (copied from bookpod-author-tools/trunk/bpat-warehouse-webhook-shielding.php)
-
tags/2.1.1/trunk/bpat-woocommerce-products.php (copied) (copied from bookpod-author-tools/trunk/bpat-woocommerce-products.php)
-
tags/2.1.1/trunk/bpat-woocommerce-shipping.php (copied) (copied from bookpod-author-tools/trunk/bpat-woocommerce-shipping.php)
-
tags/2.1.1/trunk/languages/bookpod-author-tools-he_IL.mo (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools-he_IL.mo)
-
tags/2.1.1/trunk/languages/bookpod-author-tools-he_IL.po (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools-he_IL.po) (1 diff)
-
tags/2.1.1/trunk/languages/bookpod-author-tools.pot (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools.pot)
-
tags/2.1.1/trunk/readme-he_IL.txt (copied) (copied from bookpod-author-tools/trunk/readme-he_IL.txt) (1 diff)
-
tags/2.1.1/trunk/readme.txt (copied) (copied from bookpod-author-tools/trunk/readme.txt) (1 diff)
-
tags/2.1.2 (copied) (copied from bookpod-author-tools/trunk)
-
tags/2.1.2/assets/bpat-admin.js (copied) (copied from bookpod-author-tools/trunk/assets/bpat-admin.js)
-
tags/2.1.2/assets/bpat-form.css (copied) (copied from bookpod-author-tools/trunk/assets/bpat-form.css)
-
tags/2.1.2/assets/bpat-form.js (copied) (copied from bookpod-author-tools/trunk/assets/bpat-form.js)
-
tags/2.1.2/bookpod-author-tools.php (copied) (copied from bookpod-author-tools/trunk/bookpod-author-tools.php) (1 diff)
-
tags/2.1.2/bpat-book.php (copied) (copied from bookpod-author-tools/trunk/bpat-book.php) (2 diffs)
-
tags/2.1.2/bpat-checkout-logic.js (copied) (copied from bookpod-author-tools/trunk/bpat-checkout-logic.js)
-
tags/2.1.2/bpat-order.php (copied) (copied from bookpod-author-tools/trunk/bpat-order.php) (3 diffs)
-
tags/2.1.2/bpat-warehouse-webhook-shielding.php (copied) (copied from bookpod-author-tools/trunk/bpat-warehouse-webhook-shielding.php)
-
tags/2.1.2/bpat-woocommerce-products.php (copied) (copied from bookpod-author-tools/trunk/bpat-woocommerce-products.php)
-
tags/2.1.2/bpat-woocommerce-shipping.php (copied) (copied from bookpod-author-tools/trunk/bpat-woocommerce-shipping.php)
-
tags/2.1.2/languages/bookpod-author-tools-he_IL.mo (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools-he_IL.mo)
-
tags/2.1.2/languages/bookpod-author-tools-he_IL.po (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools-he_IL.po) (1 diff)
-
tags/2.1.2/languages/bookpod-author-tools.pot (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools.pot)
-
tags/2.1.2/readme-he_IL.txt (copied) (copied from bookpod-author-tools/trunk/readme-he_IL.txt) (1 diff)
-
tags/2.1.2/readme.txt (copied) (copied from bookpod-author-tools/trunk/readme.txt) (1 diff)
-
tags/2.1.2/trunk (copied) (copied from bookpod-author-tools/trunk)
-
tags/2.1.2/trunk/assets/bpat-admin.js (copied) (copied from bookpod-author-tools/trunk/assets/bpat-admin.js)
-
tags/2.1.2/trunk/assets/bpat-form.css (copied) (copied from bookpod-author-tools/trunk/assets/bpat-form.css)
-
tags/2.1.2/trunk/assets/bpat-form.js (copied) (copied from bookpod-author-tools/trunk/assets/bpat-form.js)
-
tags/2.1.2/trunk/bookpod-author-tools.php (copied) (copied from bookpod-author-tools/trunk/bookpod-author-tools.php) (1 diff)
-
tags/2.1.2/trunk/bpat-book.php (copied) (copied from bookpod-author-tools/trunk/bpat-book.php) (2 diffs)
-
tags/2.1.2/trunk/bpat-checkout-logic.js (copied) (copied from bookpod-author-tools/trunk/bpat-checkout-logic.js)
-
tags/2.1.2/trunk/bpat-order.php (copied) (copied from bookpod-author-tools/trunk/bpat-order.php) (3 diffs)
-
tags/2.1.2/trunk/bpat-warehouse-webhook-shielding.php (copied) (copied from bookpod-author-tools/trunk/bpat-warehouse-webhook-shielding.php)
-
tags/2.1.2/trunk/bpat-woocommerce-products.php (copied) (copied from bookpod-author-tools/trunk/bpat-woocommerce-products.php)
-
tags/2.1.2/trunk/bpat-woocommerce-shipping.php (copied) (copied from bookpod-author-tools/trunk/bpat-woocommerce-shipping.php)
-
tags/2.1.2/trunk/languages/bookpod-author-tools-he_IL.mo (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools-he_IL.mo)
-
tags/2.1.2/trunk/languages/bookpod-author-tools-he_IL.po (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools-he_IL.po) (1 diff)
-
tags/2.1.2/trunk/languages/bookpod-author-tools.pot (copied) (copied from bookpod-author-tools/trunk/languages/bookpod-author-tools.pot)
-
tags/2.1.2/trunk/readme-he_IL.txt (copied) (copied from bookpod-author-tools/trunk/readme-he_IL.txt) (1 diff)
-
tags/2.1.2/trunk/readme.txt (copied) (copied from bookpod-author-tools/trunk/readme.txt) (1 diff)
-
trunk/bookpod-author-tools.php (modified) (1 diff)
-
trunk/bpat-book.php (modified) (2 diffs)
-
trunk/bpat-order.php (modified) (3 diffs)
-
trunk/languages/bookpod-author-tools-he_IL.po (modified) (1 diff)
-
trunk/readme-he_IL.txt (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bookpod-author-tools/tags/2.1.1/bookpod-author-tools.php
r3449910 r3451339 3 3 * Plugin Name: BookPod Author Tools 4 4 * Description: A plugin for managing books and orders through Bookpod. 5 * Version: 2.1. 15 * Version: 2.1.2 6 6 * Author: Rachel Stern 7 7 * Text Domain: bookpod-author-tools -
bookpod-author-tools/tags/2.1.1/bpat-book.php
r3449910 r3451339 483 483 plugins_url( 'assets/bpat-form.css', __FILE__ ), 484 484 array(), 485 '2.1. 1'485 '2.1.2' 486 486 ); 487 487 … … 490 490 plugins_url( 'assets/bpat-form.js', __FILE__ ), 491 491 array(), 492 '2.1. 1',492 '2.1.2', 493 493 true 494 494 ); -
bookpod-author-tools/tags/2.1.1/languages/bookpod-author-tools-he_IL.po
r3449910 r3451339 864 864 #: bpat-order.php:1205 865 865 msgid "Search by city or street..." 866 msgstr "חפש ילפי עיר או רחוב..."866 msgstr "חפש לפי עיר או רחוב..." 867 867 868 868 #: bpat-book.php:1186 -
bookpod-author-tools/tags/2.1.1/readme-he_IL.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/tags/2.1.1/readme.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/tags/2.1.1/trunk/bookpod-author-tools.php
r3449910 r3451339 3 3 * Plugin Name: BookPod Author Tools 4 4 * Description: A plugin for managing books and orders through Bookpod. 5 * Version: 2.1. 15 * Version: 2.1.2 6 6 * Author: Rachel Stern 7 7 * Text Domain: bookpod-author-tools -
bookpod-author-tools/tags/2.1.1/trunk/bpat-book.php
r3449910 r3451339 483 483 plugins_url( 'assets/bpat-form.css', __FILE__ ), 484 484 array(), 485 '2.1. 1'485 '2.1.2' 486 486 ); 487 487 … … 490 490 plugins_url( 'assets/bpat-form.js', __FILE__ ), 491 491 array(), 492 '2.1. 1',492 '2.1.2', 493 493 true 494 494 ); -
bookpod-author-tools/tags/2.1.1/trunk/bpat-order.php
r3449910 r3451339 286 286 287 287 if ($shipping_code === 1) { 288 if ( empty( $pickup_point_id ) ) { 288 if ( empty( $pickup_point_id ) && $is_combined_order && ! $redirect_combined_orders_pickup ) { 289 $pickup_point_id = bpat_find_pickup_point_id_by_city( $address_details['city'] ?? '' ); 290 if ( empty( $pickup_point_id ) ) { 291 $pickup_point_id = '0000'; 292 } 293 } 294 295 if ( empty( $pickup_point_id ) ) { 289 296 $pickup_point_id = bpat_extract_pickup_point_from_order( $order ); 290 297 } … … 317 324 $shipping_details['floor'] = $floor_num; 318 325 $shipping_details['notes'] = $address_notes; 319 $shipment_remarks_parts = array_filter( array( $customer_note, $delivery_notes ), 'strlen' ); 320 if ( ! empty( $shipment_remarks_parts ) ) { 321 $shipping_details['shipment_remarks'] = implode( ' | ', $shipment_remarks_parts ); 322 } 326 $shipping_details['shipment_remarks'] = $delivery_notes; 323 327 } 324 328 … … 1104 1108 } 1105 1109 1110 function bpat_find_pickup_point_id_by_city( $city ) { 1111 $normalized_city = bpat_normalize_scalar_value( $city ); 1112 if ( $normalized_city === '' ) { 1113 return ''; 1114 } 1115 1116 if ( function_exists( 'mb_strtolower' ) ) { 1117 $normalized_city = mb_strtolower( $normalized_city ); 1118 } else { 1119 $normalized_city = strtolower( $normalized_city ); 1120 } 1121 1122 $points = bpat_get_pickup_points_list(); 1123 if ( empty( $points ) || ! is_array( $points ) ) { 1124 return ''; 1125 } 1126 1127 $candidates = array(); 1128 1129 foreach ( $points as $point ) { 1130 if ( ! is_array( $point ) ) { 1131 continue; 1132 } 1133 1134 $point_city = $point['city'] ?? $point['city_name'] ?? $point['cityName'] ?? ''; 1135 $point_city = bpat_normalize_scalar_value( $point_city ); 1136 if ( $point_city === '' ) { 1137 continue; 1138 } 1139 1140 if ( function_exists( 'mb_strtolower' ) ) { 1141 $point_city = mb_strtolower( $point_city ); 1142 } else { 1143 $point_city = strtolower( $point_city ); 1144 } 1145 1146 if ( $point_city !== $normalized_city ) { 1147 continue; 1148 } 1149 1150 $candidate_id = $point['n_code'] ?? $point['id'] ?? $point['pointId'] ?? null; 1151 if ( ! $candidate_id ) { 1152 continue; 1153 } 1154 1155 $candidates[] = (string) $candidate_id; 1156 } 1157 1158 if ( empty( $candidates ) ) { 1159 return ''; 1160 } 1161 1162 $random_index = wp_rand( 0, count( $candidates ) - 1 ); 1163 return $candidates[ $random_index ]; 1164 } 1106 1165 1107 1166 add_action('wp_ajax_bpat_get_pickup_points', 'bpat_ajax_get_pickup_points'); -
bookpod-author-tools/tags/2.1.1/trunk/languages/bookpod-author-tools-he_IL.po
r3449910 r3451339 864 864 #: bpat-order.php:1205 865 865 msgid "Search by city or street..." 866 msgstr "חפש ילפי עיר או רחוב..."866 msgstr "חפש לפי עיר או רחוב..." 867 867 868 868 #: bpat-book.php:1186 -
bookpod-author-tools/tags/2.1.1/trunk/readme-he_IL.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/tags/2.1.1/trunk/readme.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/tags/2.1.2/bookpod-author-tools.php
r3449910 r3451339 3 3 * Plugin Name: BookPod Author Tools 4 4 * Description: A plugin for managing books and orders through Bookpod. 5 * Version: 2.1. 15 * Version: 2.1.2 6 6 * Author: Rachel Stern 7 7 * Text Domain: bookpod-author-tools -
bookpod-author-tools/tags/2.1.2/bpat-book.php
r3449910 r3451339 483 483 plugins_url( 'assets/bpat-form.css', __FILE__ ), 484 484 array(), 485 '2.1. 1'485 '2.1.2' 486 486 ); 487 487 … … 490 490 plugins_url( 'assets/bpat-form.js', __FILE__ ), 491 491 array(), 492 '2.1. 1',492 '2.1.2', 493 493 true 494 494 ); -
bookpod-author-tools/tags/2.1.2/bpat-order.php
r3449910 r3451339 286 286 287 287 if ($shipping_code === 1) { 288 if ( empty( $pickup_point_id ) ) { 288 if ( empty( $pickup_point_id ) && $is_combined_order && ! $redirect_combined_orders_pickup ) { 289 $pickup_point_id = bpat_find_pickup_point_id_by_city( $address_details['city'] ?? '' ); 290 if ( empty( $pickup_point_id ) ) { 291 $pickup_point_id = '0000'; 292 } 293 } 294 295 if ( empty( $pickup_point_id ) ) { 289 296 $pickup_point_id = bpat_extract_pickup_point_from_order( $order ); 290 297 } … … 317 324 $shipping_details['floor'] = $floor_num; 318 325 $shipping_details['notes'] = $address_notes; 319 $shipment_remarks_parts = array_filter( array( $customer_note, $delivery_notes ), 'strlen' ); 320 if ( ! empty( $shipment_remarks_parts ) ) { 321 $shipping_details['shipment_remarks'] = implode( ' | ', $shipment_remarks_parts ); 322 } 326 $shipping_details['shipment_remarks'] = $delivery_notes; 323 327 } 324 328 … … 1104 1108 } 1105 1109 1110 function bpat_find_pickup_point_id_by_city( $city ) { 1111 $normalized_city = bpat_normalize_scalar_value( $city ); 1112 if ( $normalized_city === '' ) { 1113 return ''; 1114 } 1115 1116 if ( function_exists( 'mb_strtolower' ) ) { 1117 $normalized_city = mb_strtolower( $normalized_city ); 1118 } else { 1119 $normalized_city = strtolower( $normalized_city ); 1120 } 1121 1122 $points = bpat_get_pickup_points_list(); 1123 if ( empty( $points ) || ! is_array( $points ) ) { 1124 return ''; 1125 } 1126 1127 $candidates = array(); 1128 1129 foreach ( $points as $point ) { 1130 if ( ! is_array( $point ) ) { 1131 continue; 1132 } 1133 1134 $point_city = $point['city'] ?? $point['city_name'] ?? $point['cityName'] ?? ''; 1135 $point_city = bpat_normalize_scalar_value( $point_city ); 1136 if ( $point_city === '' ) { 1137 continue; 1138 } 1139 1140 if ( function_exists( 'mb_strtolower' ) ) { 1141 $point_city = mb_strtolower( $point_city ); 1142 } else { 1143 $point_city = strtolower( $point_city ); 1144 } 1145 1146 if ( $point_city !== $normalized_city ) { 1147 continue; 1148 } 1149 1150 $candidate_id = $point['n_code'] ?? $point['id'] ?? $point['pointId'] ?? null; 1151 if ( ! $candidate_id ) { 1152 continue; 1153 } 1154 1155 $candidates[] = (string) $candidate_id; 1156 } 1157 1158 if ( empty( $candidates ) ) { 1159 return ''; 1160 } 1161 1162 $random_index = wp_rand( 0, count( $candidates ) - 1 ); 1163 return $candidates[ $random_index ]; 1164 } 1106 1165 1107 1166 add_action('wp_ajax_bpat_get_pickup_points', 'bpat_ajax_get_pickup_points'); -
bookpod-author-tools/tags/2.1.2/languages/bookpod-author-tools-he_IL.po
r3449910 r3451339 864 864 #: bpat-order.php:1205 865 865 msgid "Search by city or street..." 866 msgstr "חפש ילפי עיר או רחוב..."866 msgstr "חפש לפי עיר או רחוב..." 867 867 868 868 #: bpat-book.php:1186 -
bookpod-author-tools/tags/2.1.2/readme-he_IL.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/tags/2.1.2/readme.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/tags/2.1.2/trunk/bookpod-author-tools.php
r3449910 r3451339 3 3 * Plugin Name: BookPod Author Tools 4 4 * Description: A plugin for managing books and orders through Bookpod. 5 * Version: 2.1. 15 * Version: 2.1.2 6 6 * Author: Rachel Stern 7 7 * Text Domain: bookpod-author-tools -
bookpod-author-tools/tags/2.1.2/trunk/bpat-book.php
r3449910 r3451339 483 483 plugins_url( 'assets/bpat-form.css', __FILE__ ), 484 484 array(), 485 '2.1. 1'485 '2.1.2' 486 486 ); 487 487 … … 490 490 plugins_url( 'assets/bpat-form.js', __FILE__ ), 491 491 array(), 492 '2.1. 1',492 '2.1.2', 493 493 true 494 494 ); -
bookpod-author-tools/tags/2.1.2/trunk/bpat-order.php
r3449910 r3451339 286 286 287 287 if ($shipping_code === 1) { 288 if ( empty( $pickup_point_id ) ) { 288 if ( empty( $pickup_point_id ) && $is_combined_order && ! $redirect_combined_orders_pickup ) { 289 $pickup_point_id = bpat_find_pickup_point_id_by_city( $address_details['city'] ?? '' ); 290 if ( empty( $pickup_point_id ) ) { 291 $pickup_point_id = '0000'; 292 } 293 } 294 295 if ( empty( $pickup_point_id ) ) { 289 296 $pickup_point_id = bpat_extract_pickup_point_from_order( $order ); 290 297 } … … 317 324 $shipping_details['floor'] = $floor_num; 318 325 $shipping_details['notes'] = $address_notes; 319 $shipment_remarks_parts = array_filter( array( $customer_note, $delivery_notes ), 'strlen' ); 320 if ( ! empty( $shipment_remarks_parts ) ) { 321 $shipping_details['shipment_remarks'] = implode( ' | ', $shipment_remarks_parts ); 322 } 326 $shipping_details['shipment_remarks'] = $delivery_notes; 323 327 } 324 328 … … 1104 1108 } 1105 1109 1110 function bpat_find_pickup_point_id_by_city( $city ) { 1111 $normalized_city = bpat_normalize_scalar_value( $city ); 1112 if ( $normalized_city === '' ) { 1113 return ''; 1114 } 1115 1116 if ( function_exists( 'mb_strtolower' ) ) { 1117 $normalized_city = mb_strtolower( $normalized_city ); 1118 } else { 1119 $normalized_city = strtolower( $normalized_city ); 1120 } 1121 1122 $points = bpat_get_pickup_points_list(); 1123 if ( empty( $points ) || ! is_array( $points ) ) { 1124 return ''; 1125 } 1126 1127 $candidates = array(); 1128 1129 foreach ( $points as $point ) { 1130 if ( ! is_array( $point ) ) { 1131 continue; 1132 } 1133 1134 $point_city = $point['city'] ?? $point['city_name'] ?? $point['cityName'] ?? ''; 1135 $point_city = bpat_normalize_scalar_value( $point_city ); 1136 if ( $point_city === '' ) { 1137 continue; 1138 } 1139 1140 if ( function_exists( 'mb_strtolower' ) ) { 1141 $point_city = mb_strtolower( $point_city ); 1142 } else { 1143 $point_city = strtolower( $point_city ); 1144 } 1145 1146 if ( $point_city !== $normalized_city ) { 1147 continue; 1148 } 1149 1150 $candidate_id = $point['n_code'] ?? $point['id'] ?? $point['pointId'] ?? null; 1151 if ( ! $candidate_id ) { 1152 continue; 1153 } 1154 1155 $candidates[] = (string) $candidate_id; 1156 } 1157 1158 if ( empty( $candidates ) ) { 1159 return ''; 1160 } 1161 1162 $random_index = wp_rand( 0, count( $candidates ) - 1 ); 1163 return $candidates[ $random_index ]; 1164 } 1106 1165 1107 1166 add_action('wp_ajax_bpat_get_pickup_points', 'bpat_ajax_get_pickup_points'); -
bookpod-author-tools/tags/2.1.2/trunk/languages/bookpod-author-tools-he_IL.po
r3449910 r3451339 864 864 #: bpat-order.php:1205 865 865 msgid "Search by city or street..." 866 msgstr "חפש ילפי עיר או רחוב..."866 msgstr "חפש לפי עיר או רחוב..." 867 867 868 868 #: bpat-book.php:1186 -
bookpod-author-tools/tags/2.1.2/trunk/readme-he_IL.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/tags/2.1.2/trunk/readme.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/trunk/bookpod-author-tools.php
r3449910 r3451339 3 3 * Plugin Name: BookPod Author Tools 4 4 * Description: A plugin for managing books and orders through Bookpod. 5 * Version: 2.1. 15 * Version: 2.1.2 6 6 * Author: Rachel Stern 7 7 * Text Domain: bookpod-author-tools -
bookpod-author-tools/trunk/bpat-book.php
r3449910 r3451339 483 483 plugins_url( 'assets/bpat-form.css', __FILE__ ), 484 484 array(), 485 '2.1. 1'485 '2.1.2' 486 486 ); 487 487 … … 490 490 plugins_url( 'assets/bpat-form.js', __FILE__ ), 491 491 array(), 492 '2.1. 1',492 '2.1.2', 493 493 true 494 494 ); -
bookpod-author-tools/trunk/bpat-order.php
r3449910 r3451339 286 286 287 287 if ($shipping_code === 1) { 288 if ( empty( $pickup_point_id ) ) { 288 if ( empty( $pickup_point_id ) && $is_combined_order && ! $redirect_combined_orders_pickup ) { 289 $pickup_point_id = bpat_find_pickup_point_id_by_city( $address_details['city'] ?? '' ); 290 if ( empty( $pickup_point_id ) ) { 291 $pickup_point_id = '0000'; 292 } 293 } 294 295 if ( empty( $pickup_point_id ) ) { 289 296 $pickup_point_id = bpat_extract_pickup_point_from_order( $order ); 290 297 } … … 317 324 $shipping_details['floor'] = $floor_num; 318 325 $shipping_details['notes'] = $address_notes; 319 $shipment_remarks_parts = array_filter( array( $customer_note, $delivery_notes ), 'strlen' ); 320 if ( ! empty( $shipment_remarks_parts ) ) { 321 $shipping_details['shipment_remarks'] = implode( ' | ', $shipment_remarks_parts ); 322 } 326 $shipping_details['shipment_remarks'] = $delivery_notes; 323 327 } 324 328 … … 1104 1108 } 1105 1109 1110 function bpat_find_pickup_point_id_by_city( $city ) { 1111 $normalized_city = bpat_normalize_scalar_value( $city ); 1112 if ( $normalized_city === '' ) { 1113 return ''; 1114 } 1115 1116 if ( function_exists( 'mb_strtolower' ) ) { 1117 $normalized_city = mb_strtolower( $normalized_city ); 1118 } else { 1119 $normalized_city = strtolower( $normalized_city ); 1120 } 1121 1122 $points = bpat_get_pickup_points_list(); 1123 if ( empty( $points ) || ! is_array( $points ) ) { 1124 return ''; 1125 } 1126 1127 $candidates = array(); 1128 1129 foreach ( $points as $point ) { 1130 if ( ! is_array( $point ) ) { 1131 continue; 1132 } 1133 1134 $point_city = $point['city'] ?? $point['city_name'] ?? $point['cityName'] ?? ''; 1135 $point_city = bpat_normalize_scalar_value( $point_city ); 1136 if ( $point_city === '' ) { 1137 continue; 1138 } 1139 1140 if ( function_exists( 'mb_strtolower' ) ) { 1141 $point_city = mb_strtolower( $point_city ); 1142 } else { 1143 $point_city = strtolower( $point_city ); 1144 } 1145 1146 if ( $point_city !== $normalized_city ) { 1147 continue; 1148 } 1149 1150 $candidate_id = $point['n_code'] ?? $point['id'] ?? $point['pointId'] ?? null; 1151 if ( ! $candidate_id ) { 1152 continue; 1153 } 1154 1155 $candidates[] = (string) $candidate_id; 1156 } 1157 1158 if ( empty( $candidates ) ) { 1159 return ''; 1160 } 1161 1162 $random_index = wp_rand( 0, count( $candidates ) - 1 ); 1163 return $candidates[ $random_index ]; 1164 } 1106 1165 1107 1166 add_action('wp_ajax_bpat_get_pickup_points', 'bpat_ajax_get_pickup_points'); -
bookpod-author-tools/trunk/languages/bookpod-author-tools-he_IL.po
r3449910 r3451339 864 864 #: bpat-order.php:1205 865 865 msgid "Search by city or street..." 866 msgstr "חפש ילפי עיר או רחוב..."866 msgstr "חפש לפי עיר או רחוב..." 867 867 868 868 #: bpat-book.php:1186 -
bookpod-author-tools/trunk/readme-he_IL.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later -
bookpod-author-tools/trunk/readme.txt
r3449910 r3451339 4 4 Requires at least: 5.8 5 5 Tested up to: 6.9 6 Stable tag: 2.1. 16 Stable tag: 2.1.2 7 7 Requires PHP: 7.4 8 8 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.