Changeset 3235330
- Timestamp:
- 02/05/2025 10:58:08 AM (14 months ago)
- Location:
- hfd-epost-integration/trunk
- Files:
-
- 4 edited
-
class/App.php (modified) (3 diffs)
-
class/Helper/Hfd/Api.php (modified) (5 diffs)
-
hfd-woocommerce-epost.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hfd-epost-integration/trunk/class/App.php
r3230450 r3235330 65 65 //flush reqrite rules 66 66 add_filter( 'admin_init', array( $this, 'flushRewriteUrls' ) ); 67 68 //render wc_get_orders query 69 add_filter( 'woocommerce_order_data_store_cpt_get_orders_query', array( $this, 'hfd_handle_order_custom_query_vars' ), 10, 2 ); 70 67 71 68 //add wordpress ron for auto sync 72 69 add_filter( 'cron_schedules', array( $this, 'hfdAutoSyncOrderCron' ) ); … … 110 107 } 111 108 } 112 113 public function hfd_handle_order_custom_query_vars( $query, $query_vars ){ 114 if( isset( $query_vars['hfd_cron'] ) && ! empty( $query_vars['hfd_cron'] ) ){ 115 $query['meta_query'][] = array( 116 'key' => 'hfd_ship_number', 117 'compare' => 'NOT EXISTS', 118 ); 119 $query['meta_query'][] = array( 120 'key' => 'hfd_sync_flag', 121 'compare' => 'NOT EXISTS', 122 ); 123 } 124 125 return $query; 126 } 127 109 128 110 public function is_block_checkout(){ 129 111 $checkout_page_id = get_option( 'woocommerce_checkout_page_id' ); … … 210 192 'status' => array( $hfd_auto_sync_status ), 211 193 'return' => 'ids', 212 'hfd_cron' => 'yes', 194 'meta_key' => 'hfd_sync_flag', 195 'meta_compare' => 'NOT EXISTS', 213 196 'date_query' => array( 214 'after' => wp_date( 'Y-m-d H:i:s', strtotime( '-'.( $hfd_auto_sync_time + 10 ).' minutes' ) ),215 'before' => wp_date( 'Y-m-d H:i:s', strtotime( '-'.$hfd_auto_sync_time.' minutes' ) )197 'after' => date( 'Y-m-d H:i:s', strtotime( '-'.( $hfd_auto_sync_time + 10 ).' minutes' ) ), 198 'before' => date( 'Y-m-d H:i:s', strtotime( '-'.$hfd_auto_sync_time.' minutes' ) ) 216 199 ), 217 200 ); -
hfd-epost-integration/trunk/class/Helper/Hfd/Api.php
r3206333 r3235330 29 29 $orderNumber = $order->get_id(); 30 30 31 list($param3, $param7 ) = $this->_paramBaseOnShippingMethod($order);31 list($param3, $param7, $cargohazor) = $this->_paramBaseOnShippingMethod($order); 32 32 $userName = __('Guest', 'hfd-integration'); 33 33 … … 98 98 ); 99 99 100 //add cargoHazor if govina 101 /* if( $cargohazor ){ 102 //$pParam['CargoTypeHazor'] = $cargohazor; 103 $pParam['govina'] = array( 104 'code' => $this->_getParam30( $order ), 105 'sum' => (int)$order->get_total(), 106 'date' => date( 'Ymd', strtotime( $order->get_date_created() ) ), 107 ); 108 } */ 109 100 110 //send order items only if yes selected 101 111 if( $hfd_sync_order_items == "yes" ){ … … 246 256 switch ($shippingMethod) { 247 257 case \Hfd\Woocommerce\Shipping\Epost::METHOD_ID: 248 $result = ['50', '11' ];258 $result = ['50', '11', '0']; 249 259 break; 250 260 case \Hfd\Woocommerce\Shipping\Govina::METHOD_ID: 251 $result = ['37', '10' ];261 $result = ['37', '10', '100']; 252 262 break; 253 263 case 'free_shipping': 254 264 default: 255 $result = ['35', '10' ];265 $result = ['35', '10', '0']; 256 266 break; 257 267 } … … 314 324 315 325 public function _getParam30($order){ 316 /*$shippingMethod = $this->_getShippingMethod($order);326 $shippingMethod = $this->_getShippingMethod($order); 317 327 if( $shippingMethod == \Hfd\Woocommerce\Shipping\Govina::METHOD_ID ){ 318 328 $betanet_pmethod = get_post_meta( $order->get_id(), 'betanet_pmethod', true ); … … 322 332 return 11; 323 333 } 324 } */334 } 325 335 return ''; 326 336 } -
hfd-epost-integration/trunk/hfd-woocommerce-epost.php
r3230450 r3235330 5 5 Plugin URI: 6 6 Description: Add shipping method of ePost, allowing the user on the checkout, to select the pickup location point from a google map popup. Also allows to synch the order to HFD API after the order is created. 7 Version: 2.1 57 Version: 2.16 8 8 Author: HFD 9 9 Author URI: https://www.hfd.co.il -
hfd-epost-integration/trunk/readme.txt
r3230450 r3235330 5 5 Requires at least: 4.0 6 6 Tested up to: 6.7 7 Stable tag: 2.1 57 Stable tag: 2.16 8 8 Requires PHP: 5.4 9 9 License: GPLv2 or later … … 122 122 * Performance Improvement 123 123 124 = 2.16 = 125 * Performance Improvement 126 124 127 == Frequently Asked Questions == 125 128 = Why Google Maps isnt loading =
Note: See TracChangeset
for help on using the changeset viewer.