PluginProbe
MakeCommerce for WooCommerce / 3.3.1
MakeCommerce for WooCommerce v3.3.1
4.1.0 4.0.8 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.2 All 96 releases
← All changes | shipping/method/method.php +2 -36 trunk3.3.1 View file →
@@ -15,19 +15,9 @@
15 15 use ShippingClasses;
16 16
17 17 public $id;
18 18 public $instance_id;
19 - public $availability;
20 - public $countries;
21 19
22 - protected $ext;
23 - protected $order_country;
24 -
25 - private $enable;
26 - private $free_shipping_min_amount;
27 - private $maximum_weight;
28 - private $name_ext;
29 -
30 20 public $supports = array(
31 21 'shipping-zones',
32 22 'instance-settings',
33 23 'instance-settings-modal',
@@ -395,9 +385,9 @@
395 385
396 386 //check all free shipping options:
397 387 $free_shipping_min_amount = $this->instance_settings['free_shipping_min_amount'];
398 388
399 - if ( $free_shipping_min_amount && $package['cart_subtotal'] >= $free_shipping_min_amount ) {
389 + if ( $free_shipping_min_amount && $package['contents_cost'] >= $free_shipping_min_amount ) {
400 390 $rate["cost"] = 0;
401 391 }
402 392
403 393 //check only for parcelmachines
@@ -404,8 +394,9 @@
404 394 if ( $this->type == "apt" ) {
405 395
406 396 $free_shipping = true;
407 397 foreach ( $package['contents'] as $line ) {
398 +
408 399 $free_shipping = get_post_meta( $line['product_id'], '_no_shipping_cost', true ) === 'yes' ? $free_shipping : false;
409 400 }
410 401
411 402 if ( $free_shipping ) {
@@ -667,33 +658,8 @@
667 658 'title' => sprintf( __( '%s web services password', 'wc_makecommerce_domain' ), $this->service_name ),
668 659 'type' => 'text',
669 660 'default' => ''
670 661 );
671 - }
672 -
673 - /**
674 - * Checks if an object of a class already has the filter initialized
675 - * Returns true if it is added, false if it is not
676 - *
677 - * @since 3.5.0
678 - */
679 - public function check_filter_hook_initialization( $filter, $priority = 10 ) {
680 -
681 - global $wp_filter;
682 - $hook = $wp_filter[ $filter ] ?? [];
683 -
684 - if ( empty( $hook ) ) {
685 - return false;
686 - }
687 -
688 - // Check if the object instance is already registered as a callback
689 - foreach ( $hook->callbacks[$priority] ?? [] as $callback ) {
690 - if ( is_array($callback['function'] ) && $callback['function'][0]->id === $this->id ) {
691 - return true;
692 - }
693 - }
694 -
695 - return false;
696 662 }
697 663
698 664 /**
699 665 * Initializes method type, required function for all method types