I’m trying to display WooCommerce product thumbnail to WooCommerce Quick order window, I tried using ‘woocommerce_admin_order_preview_end’ and ‘woocommerce_admin_order_preview_get_order_details’ in the below code but nothing changed, Can anyone point me in the right direction? thanks! My Attempted codes Answer Via woocommerce_admin_order_preview_line_item_columns filter hook, we have the option to remove the existing product column and add a new column, for order preview.
Tag: hook-woocommerce
Change “add to cart” button text for products that have “no price” and “out of stock”
I want to change the “add to cart” text button for products that meet the following conditions: empty price out of stock The intention is to change the text to “Not available right now” Here is an example image to clarify my question This is the code that I use. But I can’t make it work. Any ideas of where
Add variable product downloadable files based on variation attributes in WooCommerce
I am trying to check if a product variation is currently in the cart, and add dynamic content to the email & thank you pages based on which variable products are present. The dynamic content would be generated via custom file input fields (ACF) added to the product on the admin side. I’ve managed to put together the following code:
How to display a $_SESSION variable in custom woocommerce checkout field?
I am able to verify by viewing the “Application” tab in the dev tools that my session variable has carried over to the checkout page; and I have the WC hook setup that allows me to change the “default”/value of the field I want to insert data into. However, I am unable to get them to read each other. As
WooCommerce custom localization address format for specific country
I am printing address labels from WooCommerce and find that the line breaks for the addresses are not as I need them. I found the code I need to change in woocommerce_localisation_address_formats hook and have added the line break but I do not know enough to add the correct code to the functions file thus avoiding going back to the
Customize “subsription option” string generated by WooCommerce Subscribe All The Things plugin
I am trying to add text through functions.php just after subscription-price”> I can do this with direct code editing, but need help to apply filter through functions.php without changing orignal files. something like that Answer This should suffice, basically anything you assign to the $option_descreption variable will be displayed Replace Your new text in this answer, depending on your needs
What happens if php://input receives simultaneous webhooks?
I wrote an API that takes a WooCommerce webhook and inputs the data into our CRM. I’m using: The whole script is in one file because it’s so simple. My question is what happens if php://input receives two or more webhooks at the same time. Would it operate like a queue or could one be potentially dropped? Reason I ask
Add content to WooCommerce My account dashboard main page section
Hi I have been searching for how to add items or custom HTML to the main dashboard landing page of the “my account” section of WooCommerce but cant find it. I am adding this in my child theme and all I can find through searches is how to directly edit the woocommerce_account_content. Since I want to do this out of
Disable only specific flat rate shipping method when free shipping is available in WooCommerce
I have two flat rates on my WooCommerce site and I want to disable one of them, when free shipping is enabled. I have a function which is working for all flat rates only. How do I check for an instance id on a shipping rate? Can anyone help me understand how to check for the instance id? I Was
How to check the value of a WooCommerce filter hook parameter?
In WooCommerce you have many hooks & filters. How can I check what is inside of a filter parameter? For example, I want to unset some shipping rates based on certain conditions. How can I check what is inside my $rates or $package parameter? Answer You can first enable Wordpress debug log by editing your wp-config.php file adding the following