Goal: I need to include an event snippet for specific tracking on the Woocommerce Order Confirmation page (the page immediately following a purchase). I must pass order_id, currency and total to the …
Tag: hook-woocommerce
How to make a redirection to checkout on a custom add to cart button in WooCommerce
I’m using WooCommerce and added the following code to functions.php: What I would expect is that when a user adds a product to their basket: this code will redirect the user to the checkout page without actually adding the product to the basket. However, it still adds the product to the basket. What is …
Display related products using a shortcode on WooCommerce My account Dashboard
I’m trying to display related products in My account Dashboard page. I followed this WooCommerce Shortcodes documentation. I tried to use the following code: This does not display the related products. But when I try to display products in specific category like following, it works: Kindly any help to r…
A non well formed numeric value encountered while using wc_price WooCommerce hook
I have a simple function that used to work that I got online somewhere a few years back. It allows me to manually change the currency conversion rate for EUR (€, Euro). Problem now is this: Whereof the notice refers to this line: This is what I need help fixing. This is the complete code: Answer Since WooComm…
WooCommerce: Add Custom order statuses with custom email notifications
Using Add a new order status that Send an email notification in WooCommerce 4+ answer code, I have been able to get an email notification for ONE custom status however cannot get my head around how I would go about being able to send the email notification for BOTH custom statuses. See below the example codes…
WooCommerce – removing country field from my-account page prevents from saving address
I sell and ship products only to one country so I don’t want to display billing_country and shipping_country field to the customers. I removed the fields from both checkout and my-account addresses …
Display a product custom field only in WooCommerce Admin single orders
This question follows How to show a product custom field (custom SKU) in WooCommerce orders answer to my previous question. How do I make a product custom field articleid (custom SKU) to be visible only in Admin Order edit pages for each order item? Also, it does not work for manual orders. How to display a p…
How to show a product custom field (custom SKU) in WooCommerce orders
Is there a way to display my custom SKU under each product on the WooCommerce order page? The custom sku displays fine when I edit the product, but it does not display in the order page for the product. I need this information to show on the order so that Zapier can match it with the Visma Account Software Ar…
WooCommerce: change cart button text in loop to icon
I want to change the cart button text on archive pages to an icon. I found a snippet which does that. But that also changes the link of the cart button: Is there a way to change only the text of the button? I know, that I could change the template file /loop/add-to-cart.php. But I need a solution based on
WooCommerce: add extra images to product gallery
I want to add some extra images to the product gallery. Based on a meta field from a different post. The images should only add to the gallery in the frontend. Not to the image gallery of the product itself. EDIT: @mujuonly was right. I could use woocommerce_product_thumbnails and so I tried the following cod…