Categoria: WooCommerce

[WooCommerce/PHP] Cash on Delivery (COD) only for specific country with specific shipment rate 0

[WooCommerce/PHP] Cash on Delivery (COD) only for specific country with specific shipment rate

//enable COD only for italy function payment_gateway_disable_country( $available_gateways ) { global $woocommerce; if ( isset( $available_gateways[‘cod’] ) && $woocommerce->customer->get_country() ‘IT’ ) { unset( $available_gateways[‘cod’] ); } //make COD the only available gateway for flat_rate...