Restrict Payment
-
Hello Friends, I need help to restrict payment based on state. I set two states ‘Yangon’ and ‘Other City’ with following code. And I want to restrict payment based on that states. If the user will choose ‘Yangon’, the payment should available both Direct Bank Transfer and Cash on delivery. But if the user choose ‘Other City’, the payment should available only one Direct Bank Transfer.
Here is the code
add_filter( ‘woocommerce_states’, ‘bbloomer_custom_woocommerce_states’ );
function bbloomer_custom_woocommerce_states( $states ) {
$states[‘MM’] = array(
‘Yangon’ => ‘Yangon’, ‘Other City’
);
return $states;
}
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Restrict Payment’ is closed to new replies.