Changeset 3483751
- Timestamp:
- 03/16/2026 11:12:17 AM (2 weeks ago)
- Location:
- mailplus-shipmate
- Files:
-
- 8 added
- 3 edited
-
tags/0.2.0 (added)
-
tags/0.2.0/includes (added)
-
tags/0.2.0/includes/mailplus-shipmate-admin-settings.php (added)
-
tags/0.2.0/includes/mailplus-shipmate-order-sync.php (added)
-
tags/0.2.0/includes/mailplus-shipmate-rest-endpoints.php (added)
-
tags/0.2.0/includes/mailplus-shipmate-shipping-method.php (added)
-
tags/0.2.0/mailplus-shipmate.php (added)
-
tags/0.2.0/readme.txt (added)
-
trunk/includes/mailplus-shipmate-rest-endpoints.php (modified) (3 diffs)
-
trunk/mailplus-shipmate.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mailplus-shipmate/trunk/includes/mailplus-shipmate-rest-endpoints.php
r3451798 r3483751 15 15 'permission_callback' => '__return_true', 16 16 ) ); 17 17 18 register_rest_route('mailplus-shipmate/v1', '/orders/is_local_pickup', array( 19 'methods' => 'POST', 20 'callback' => 'mailplus_shipmate_is_local_pickup', 21 'permission_callback' => '__return_true', 22 )); 23 18 24 register_rest_route('mailplus-shipmate/v1', '/integration/complete', array( 19 25 'methods' => 'POST', … … 26 32 'callback' => 'mailplus_shipmate_handle_disconnect', 27 33 'permission_callback' => '__return_true', 28 )); 34 )); 29 35 } ); 30 36 … … 73 79 'success' => true, 74 80 'message' => 'Integration completed successfully', 81 ), 200); 82 } 83 84 function mailplus_shipmate_is_local_pickup($order_id) { 85 $order = wc_get_order( $order_id ); 86 $is_local_pickup = false; 87 88 foreach ($order->get_shipping_methods() as $item_id => $item) { 89 $method_id = $item->get_method_id(); 90 if ($method_id === 'local_pickup') { 91 $is_local_pickup = true; 92 break; // Found local pickup, no need to check further 93 } 94 } 95 96 return new WP_REST_Response(array( 97 'local_pickup' => $is_local_pickup, 98 'message' => 'done', 75 99 ), 200); 76 100 } -
mailplus-shipmate/trunk/mailplus-shipmate.php
r3451798 r3483751 3 3 * Plugin Name: MailPlus Shipmate 4 4 * Description: As an Australian shipping service, MailPlus Shipmate integrates MailPlus delivery options with WooCommerce, providing real-time shipping rates and automated parcel management through your MailPlus account. 5 * Version: 0. 1.05 * Version: 0.2.0 6 6 * Author: MailPlus 7 7 * License: GPL v2 or later -
mailplus-shipmate/trunk/readme.txt
r3452838 r3483751 5 5 Tested up to: 6.9 6 6 Requires PHP: 8.2 7 Stable tag: 0. 1.07 Stable tag: 0.2.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset
for help on using the changeset viewer.