Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function woo_add_cart_fee() {
- global $woocommerce;
- $cart = $woocommerce->cart->cart_contents;
- foreach ($cart as $key => $item ) {
- //var_dump($item);
- $itemClass = wp_get_post_terms($item->post_parent, 'product_shipping_class');
- var_dump($itemClass);
- $itemClass->slug;
- }
- }
- add_action( 'woocommerce_before_calculate_totals', 'woo_add_cart_fee' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement