Support » Plugin: WooCommerce - Country Based Payments » COD not showing up in WCCBP

Viewing 2 replies - 1 through 2 (of 2 total)
  • me the option was not displayed.
    Have it but with this code set that it is visible for Germany and not rest.

    //  Disable gateway based on country
    function payment_gateway_disable_country( $available_gateways ) {
        global $woocommerce;
        $country = !empty($woocommerce->customer->get_shipping_country()) ? $woocommerce->customer->get_shipping_country() : $woocommerce->customer->get_country();
        if ( isset( $available_gateways['cod'] ) && $country <> 'DE' ) {
            unset(  $available_gateways['cod'] );
        }
        return $available_gateways;
    }
    add_filter( 'woocommerce_available_payment_gateways', 'payment_gateway_disable_country' );
    Plugin Author Ivan Paulin

    (@ivan_paulin)

    Hello,

    Marko, which version of WordPress and WooCommerce do you use?

    I’ve tested the plugin with latest WP and WC versions and everything is working OK with the Cash On Delivery payment gateway.
    Also, are you use any other plugins for WooCommerce?

    Regards,
    Ivan

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘COD not showing up in WCCBP’ is closed to new replies.