Skip to content
Advertisement

Tag: woocommerce

WooCommerce changing order line totals

I have a plugin which applies discounts based on the category of the product. I’m using the filters below to add text to the order table in the cart: And this action to change the total price of the order/cart. The total price of the order pulls through to the checkout, as do the modified product fields. However when the

What hook for product image replacement in WooCommerce shop page

What function is called when WooCommerce returns image for products in shop page? I would like to replace image with something else. Answer To find out, you need look at content-product.php template source code from line 36 to 42: So when looking at woocommerce_template_loop_product_thumbnail() involved hooked template function source code, you will see that it uses woocommerce_get_product_thumbnail() function: So to

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

Advertisement