I want to add an extra class to the cart table row if the product is free (price of 0). I do have a way to add an extra class: The problem is, that I cannot access $cart_item in the function. I made a var_dump for $values and found the product ID in it. Is there any way to get
Tag: hook-woocommerce
Add incremental number before item name on WooCommerce order emails
I have a WooCommerce store and everything is working well. But I would like to add a number in front of every item name when an order is placed so I can put numbers on the box so the customer knows which box contains what product. (I only have 1 product but the custommer can customize that product with a
Assign a percentage fee to WooCommerce payment methods based on user roles
How do I expand this snippet to include 2 more payment gateways with different fees? The payment gateways I want to add are ‘cardgategiropay’ and ‘cardgateideal’ and the fees are 3% and 2% …
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
Hide “remove item” and “quantity input” from cart in WooCommerce
On the WooCommerce cart page I want to hide: “remove item” button “quantity input” field For items that will go in the comment of // HIDE REMOVE BUTTON & QUNATITY OF THESE ITEMS in the code below Can someone walk me through how to do that? Answer A first option is to hide these fields via jQuery and CSS. You
Check if WooCommerce custom order status exist to execute code
I am creating woocommerce plugin and I have a custom order status “wc-shipped”. I want to execute some plugin options for this custom order status only. Here is my code I want if “wc-shipped” status exist then show these plugin options but I am getting below error. How to fix this ? Answer Your hooked function has 2 variables (arguments),
Hook woocommerce_checkout_order_processed order items issue
I am working on a WooCommerce project. I need to add some entry based on ordered item in my custom table. If user ordered 3 items then those 3 entry will be place along with some data in my custom …
Add product weight and dimensions as order item meta data on WooCommerce admin manual orders
based on Save product custom-field as custom order item metadata for WooCommerce admin manual orders I have these codes that show the weight and dimensions of the product for orders placed from the frontend, but I can’t get them to work for orders that are placed manually from the backend. When I add the products I do not see the
WooCommerce cart subtotal: Display ‘free’ instead of ‘0,00’
i am searching for a solution to display ‘free’ instead of €0,00 in the WooCommerce Cart/Checkout. I know, there is a snippet for the Single Produkt itself, but is there a possibillity to change the …