Update abstract-wc-shipping-method.php
The order is backward so if you use the default 'is_available' function for your extensions, the 'excluding' option will always deny every country because this line returns an empty array.
This commit is contained in:
parent
a2759cb2b7
commit
15b10ca7bc
|
@ -180,7 +180,7 @@ abstract class WC_Shipping_Method extends WC_Settings_API {
|
|||
$ship_to_countries = array_intersect( $this->countries, array_keys( WC()->countries->get_shipping_countries() ) );
|
||||
break;
|
||||
case 'excluding' :
|
||||
$ship_to_countries = array_diff( $this->countries, array_keys( WC()->countries->get_shipping_countries() ) );
|
||||
$ship_to_countries = array_diff( array_keys( WC()->countries->get_shipping_countries() ), $this->countries );
|
||||
break;
|
||||
default :
|
||||
$ship_to_countries = array_keys( WC()->countries->get_shipping_countries() );
|
||||
|
|
Loading…
Reference in New Issue