WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » woocommerce_international_shipping

woocommerce_international_shipping

  • Any ideas how to auto select international shipping when choosing another country other than the U.S? I wrote the following function but it is not working:

    add_filter( ‘woocommerce_available_shipping_methods’, ‘cj_woocommerce_available_shipping_methods’ );

    function cj_woocommerce_available_shipping_methods( $available_methods ) {
    if ( isset( $available_methods[‘international_shipping’] ) ) {
    foreach ( $available_methods as $key => $value ) {
    if ( ‘international_shipping’ != $key ) {
    unset( $available_methods[ $key ] );
    }
    }
    }

    return $available_methods;
    }

    https://wordpress.org/plugins/woocommerce/

  • The topic ‘woocommerce_international_shipping’ is closed to new replies.
Skip to toolbar