Changeset 2699874
- Timestamp:
- 03/26/2022 08:25:44 AM (4 years ago)
- Location:
- mobipaid/trunk
- Files:
-
- 3 edited
-
includes/class-mobipaid.php (modified) (2 diffs)
-
mobipaid.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mobipaid/trunk/includes/class-mobipaid.php
r2661389 r2699874 589 589 $order_status = 'completed'; 590 590 591 foreach ($order->get_items() as $order_item){ 592 593 $item = wc_get_product($order_item->get_product_id()); 594 595 if (!$item->is_virtual()) { 591 if(count((array)$order->get_items()) > 1 ) { 592 if($this->is_product_contain_physical($order)){ 593 596 594 $order_status = 'processing';; 597 598 595 } 599 596 } 597 600 598 601 599 $this->log('order_status: '.$order_status); … … 620 618 $this->log('response_page: go to thank you page'); 621 619 } 620 } 621 622 623 public function is_gift_card( $product ) { 624 return str_contains($product->get_type(),'gift') && str_contains($product->get_type(),'card'); 625 } 626 627 public function is_product_contain_physical( $order ) { 628 629 foreach ($order->get_items() as $order_item){ 630 631 $item = wc_get_product($order_item->get_product_id()); 632 633 if (!$item->is_virtual() && !$this->is_gift_card($item)) { 634 return true; 635 } 636 } 637 638 return false; 622 639 } 623 640 -
mobipaid/trunk/mobipaid.php
r2661389 r2699874 4 4 * Plugin URI: https://github.com/MobipaidLLC/mobipaid-woocommerce 5 5 * Description: Receive payments using Mobipaid. 6 * Version: 1.0. 66 * Version: 1.0.7 7 7 * Requires at least: 5.0 8 8 * Tested up to: 5.6 … … 24 24 } 25 25 26 define( 'MOBIPAID_PLUGIN_VERSION', '1.0. 6' );26 define( 'MOBIPAID_PLUGIN_VERSION', '1.0.7' ); 27 27 28 28 register_activation_hook( __FILE__, 'mobipaid_activate_plugin' ); -
mobipaid/trunk/readme.txt
r2668681 r2699874 123 123 = 1.0.6 - 2022-01-20 = 124 124 * fix order status for virtual product and download product 125 126 = 1.0.7 - 2022-03-26 = 127 * fix order status for gift card product
Note: See TracChangeset
for help on using the changeset viewer.