Merge pull request #15611 from woocommerce/fix/15606
More strict COD method matching
This commit is contained in:
commit
4f5f04ec79
|
@ -178,10 +178,14 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( strstr( $check_method, ':' ) ) {
|
||||||
|
$check_method = current( explode( ':', $check_method ) );
|
||||||
|
}
|
||||||
|
|
||||||
$found = false;
|
$found = false;
|
||||||
|
|
||||||
foreach ( $this->enable_for_methods as $method_id ) {
|
foreach ( $this->enable_for_methods as $method_id ) {
|
||||||
if ( strpos( $check_method, $method_id ) === 0 ) {
|
if ( $check_method === $method_id ) {
|
||||||
$found = true;
|
$found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue