WordPress.org

Forums

WooCommerce - excelling eCommerce
woocommerce_international_shipping (1 post)

  1. kwmlr439
    Member
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic