WC_Shipping::get_shipping_classes()
Get an array of shipping classes.
Method of the class: WC_Shipping{}
Hooks from the method
Return
Array
.
Usage
$WC_Shipping = new WC_Shipping(); $WC_Shipping->get_shipping_classes();
WC_Shipping::get_shipping_classes() WC Shipping::get shipping classes code WC 9.4.2
public function get_shipping_classes() { if ( empty( $this->shipping_classes ) ) { $classes = get_terms( 'product_shipping_class', array( 'hide_empty' => '0', 'orderby' => 'name', ) ); $this->shipping_classes = ! is_wp_error( $classes ) ? $classes : array(); } return apply_filters( 'woocommerce_get_shipping_classes', $this->shipping_classes ); }