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:
bolderelements 2014-05-03 15:59:01 -04:00
parent 72849cb4db
commit fb80f6ba09
1 changed files with 1 additions and 1 deletions

View File

@ -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() );