I need help in finding the correct hook for WooCommerce. I’m trying to integrate design-builder API with the WooCommerce store. I have to make a redirect to the builder’s website when a customer clicks “Add To Cart” on the product page. Example URL I need redirect to: https://exampleurl.com/designBuilder/{UniqueID} {UniqueID} is generated with this: Is there a WooCommerce hook to change
Tag: product
Modify “get_cart_contents_count()” to count only specific product IDs in WooCommerce cart
I have 3 ticket products in WooCommerce and want to add a name field per ticket product purchased – so if a customer buys three tickets 3 name fields are displayed to fill out in the checkout. The code below works: But this includes all products added to cart – how can I target specific Product IDs to be only
How to rename all action and titles of WooCommerce product post type
Im using WooCommerce Plugin, and instead of the product I want to rename all titles and actions to Donations. this is what i have tried : I feel this is a very Clumsy and long way and maybe there is a better way or a plugin to rename/translate? Answer Add this to your active theme functions.php file
WooCommerce Product SKU checking is not working
I am trying to create and update woocommerce products automatically from an API. I have created the starting point of the plugin and this is my method that gets the products from the external API and then loops through them and creates a simple product in woocoommerce. It creates the products perfectly fine however if I run the code twice,
WooCommerce Update Group product attributes by child products
HOOK: Add child product attributes values to group product on saving The above code will update the pa_bedrooms attribute on the Group product on the update, not on the first creation. Can anyone tell me what I am missing here? Answer
Why are the products not shown?
The category id is delivered, but it is not clear to me why the products of this selected category are not displayed Answer Try this – Category IDs should be integer
PHP modify fetched variable and return to frontend for JS
Im fetching Product Attributes from Woocommerce, and echo them out in a script tag as variable to use with javascript in frontend. This might be a bad practice, feel free to enlighten me. Example: Product Attributes: Total height: 43m Total length: 55m PHP queries “Total-height” as Attribute Name and “43m” as Attribute Value. PHP replaces empty space with “-“. I
Show related products by attribute and products that have stock
The code below displays related products based on attributes and works fine. Unfortunately, products that are out of stock are also displayed. I tried to add this But it didn’t work. Does anyone know how to make the products displayed are products with available stock only? Any help is greatly appreciated, Thank You Answer You were starting on the right
Remove product purchase notes in certain WooCommerce email notifications
I try to remove the purchase notes from the order completed mail. Currently the purchase notes are in the order confirmation mail and also in the order completed mail. But we do not want that info in the order completed mail. So for that I found this input here: https://wordpress.stackexchange.com/questions/340045/how-do-i-hide-the-purchase-note-in-the-woocommerce-order-completed-email I also found that snipped here below. But with that
Multiple bulk dynamic pricing for WooCommerce products with specific product-tag
My intention is to add multiple bulk dynamic pricing for WooCommerce products with specific product-tag. I use the slug “petit-format” on my code. Based on Bulk dynamic pricing for WooCommerce products with specific product-tag answer code, this is my attempt: But I only have the first discount that works, but the other one doesn’t. So the $discount1 works, but the