• 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://www.ads-software.com/plugins/woocommerce/

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