Skip to content
Advertisement

Tag: woocommerce

How to get Shipping Methods custom additional data in Woocommerce?

From this comment I’ve created custom field “Shipping Method Description” inside shipping methods: But I can’t understand how to get this data in front-end inside my custom shipping template(/cart/cart-shipping.php) like: This comment isn’t clear for me how to get this instance settings. Can anyone suggest a solution? Answer WooCommerce shipping method settings are stored in wp_options table on option_name column

Filter a custom product loop to get products from a category in WooCommerce

I have this function which calls me all products type “promotion_package” in WooCommerce: I would like to get only products from “vip” product category. I tried using $product->get_categories() to find “vip” category, but it didn’t worked. How can I show only products from “vip” category? Answer You can try has_term() conditional function for ‘product_cat’ procuct category taxonomy as follows: It

Advertisement