includes/class-wc-shipping-zone.php 1 location
|
@@ 143-146 (lines=4) @@
|
140 |
|
$methods = array(); |
141 |
|
|
142 |
|
foreach ( $raw_methods as $raw_method ) { |
143 |
|
if ( in_array( $raw_method->method_id, array_keys( $allowed_classes ) ) ) { |
144 |
|
$class_name = $allowed_classes[ $raw_method->method_id ]; |
145 |
|
$methods[ $raw_method->instance_id ] = new $class_name( $raw_method->instance_id ); |
146 |
|
} |
147 |
|
} |
148 |
|
|
149 |
|
return $methods; |
includes/class-wc-shipping-zones.php 1 location
|
@@ 91-94 (lines=4) @@
|
88 |
|
$wc_shipping = WC_Shipping::instance(); |
89 |
|
$allowed_classes = $wc_shipping->get_shipping_method_class_names(); |
90 |
|
|
91 |
|
if ( in_array( $raw_shipping_method->method_id, array_keys( $allowed_classes ) ) ) { |
92 |
|
$class_name = $allowed_classes[ $raw_shipping_method->method_id ]; |
93 |
|
return new $class_name( $raw_shipping_method->instance_id ); |
94 |
|
} |
95 |
|
return false; |
96 |
|
} |
97 |
|
|