Include some javascript code in HEAD on WooCommerce Order received

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 …

WooCommerce: Set country by default in checkout page for unlogged users

How to make the country default for regular (unregistered users). But if the buyer has a personal account and entered the country there, he would not be thrown into default in checkout? I have tried …

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 …

Custom shipping rates programmatically in Woocommerce

I Want to calculate custom shipping rates based on cart amount for woocommerce, My requirement as follows, Cart amount 0-10 => £4.99 (shipping_rate_id = flat_rate:12), 10-20 => £3.99 (…

Hot to add subcategories under category element in woocommerce flatsome theme WordPress

I’m trying to set up e-commerce website. Ran into a problem with Categories element. I want the element to represent not only categories, but also subcategories below itself. I also cannot edit page …

core file deleted in woocommerce / wordpress

I have noticed that the file “wp-admin/includes/ajax-actions.php” is deleted automatically in production. Even if I upload this file via ftp, it gets deleted after some time ( ~5min ). I …

Remove “Search Results: ‘%s’” and blank space from Woocommerce Shop Search Results Page

I am trying to remove the “Search results: ‘ ‘ ” text that shows above products on the Woocommerce Storefront search results page. Below is an image with the referenced text circled: I have …

Woocommerce: add text before add-to-cart only on specific single product pages

I found the following code in order to display text before the add-to-cart-button on a single product page: // adds notice at single product page above add to cart add_action( ‘…

Remove out of stock products from WooCommerce related products custom WP query

hello I want to show related products based on my custom query but I just want to show ‘in_stocks’ products and meta_query not working with tax_query. anyone can help me? $query_args = array( ‘…

Hide coupon discount raw if no coupon has been applied on WooCommerce cart page

I add coupons and discounts total savings to my cart page. My code works fine but I have an additional question. This is the code I am currently using: add_action( ‘…