Answers for "woocommerce get shipping classes"

PHP
0

get current shipping method woocommerce

$rate_table = array();

$shipping_methods = WC()->shipping->get_shipping_methods();

foreach($shipping_methods as $shipping_method){
    $shipping_method->init();

    foreach($shipping_method->rates as $key=>$val)
        $rate_table[$key] = $val->label;
}

echo $rate_table[WC()->session->get( 'chosen_shipping_methods' )[0]];
Posted by: Guest on June-10-2020
0

woocommerce get shipping classes

$shipping_classes = get_terms( array('taxonomy' => 'product_shipping_class', 'hide_empty' => false ) );
Posted by: Guest on May-07-2020
0

WOOCOMMERCE SHIPPING METHOD

# WOOCOMMERCE SHIPPING METHOD

function name_1() {

// Add a new class here

}

add_action( 'woocommerce_shipping_init', 'name_1' );

Check on source site for more update and method
Posted by: Guest on August-09-2021

Code answers related to "woocommerce get shipping classes"

Browse Popular Code Answers by Language