Skip to content
Advertisement

Tag: product

Add custom “Add to cart” button based on ACF field to WooCommerce single product page

I want to add an additionall custom “Add to cart button” on the single product page conditionally using this code: This variable is field from ACF $mamut = get_field(‘mamut’); However when I put this code into my functions.php file, the single product page crash I am using theme Twenty nineteen and Elementor Pro. I’ve tried to remove actions and then

Get WooCommerce specific product attribute terms sorted by “menu order”

I want to sort get_the_terms by menu_order of the curent product and till now i have this code: Answer There is 2 ways to get the product attribute term names sorted by menu order (for a defined product): 1). Using wp_get_post_terms() function (WordPress way) The WordPress function get_the_terms() doesn’t allow to alter the WP_Term_Query… So instead you will use similar

Advertisement