Category "woocommerce"

How to get WooComrnce product category by meta key value

I have product categories with the meta value "old_id", I'm trying to make a function that will return the new product category id using the old id (with meta k

Display In stock available variations in WooCommerce single product

I have variable products with many variations where only a few items are actually In Stock while the majority of other variations are ''available on backorder''

Add an OpenGraph tag in WooCommerce single product pages

I have to add Product SKU to Woocommerce metatags product page (Facebook OpenGraph). I've tried to add global $product; echo "<meta property='og:id' content=

Add a minimum order price in WooCommerce, but still allow the customer to checkout when the condition is not met by charging the deficit

I would like to add a minimum order price for WooCommerce. I have found instructions on how to restrict ordering, unless the user adds more products to cart so

Coupon daily time range in WooCommerce

I'm tying to enable the use of coupons to a range of hours in Woocommerce without success. Based on Discount on specific products based on a daily time range in

Stylize woocommerce price decimals

I want to stylize the decimals in the price tag and want to delete zero decimals (before 190,00) and it should be (after 190,-) And the decimals after the "," i

Speed up woocomerce order admin search

I am using the following function to speed up woocommerce order admin search by searching in particular fields only: function custom_woocommerce_shop_order_sear

Speed up woocomerce order admin search

I am using the following function to speed up woocommerce order admin search by searching in particular fields only: function custom_woocommerce_shop_order_sear

How to change the 'stock management' availability text on single product page based on different conditions in WooCommerce

I'm trying to change the stock management availability text on single product page based on different conditions in WooCommerce. There are 5 situations, dependi

Woocommerce Reports 'get_order_report_data' not working

I am getting null response on the below query. I am trying to get sum of the products subtotal and a custom cost field for products. I am able to get the data f

How to pass "$email" to WooCommerce emails template files if not available by default

I've checked many threads on the platform. But there is no thread which explains how to use the conditional $email>id parameter straight into a template. Thi

Hide specific WooCommerce products based on product category for users under the age of 18

I want to hide specific products, based on product category for users under the age of 18. So if the user is not logged in, or if logged in but under the age of

Hide specific WooCommerce products based on product category for users under the age of 18

I want to hide specific products, based on product category for users under the age of 18. So if the user is not logged in, or if logged in but under the age of

WooCommerce - Empty the current cart on add-to-cart event

So I'm selling a digital product with WooCommerce but I don't have a shop page or anything, I just have a big CTA button on my landing page which adds the given

How to Subscription details from the wcs_get_subscriptions_for_order() function

I have this variable: $subscriptions = wcs_get_subscriptions_for_order($order_id, array('order_type' => 'parent')); Using this print_r() I can see lots of d

Display the WooCommerce product price inside a custom function

I have created a custom function to display 3 custom fields (ACF) and the product price in the WooCommerce Archive/Shop page. My Custom fields are showing corre

Display a success custom notice after Placing an Order in WooCommerce

I need to check on the checkout page whether payment has been successful or not and display the message: 'Your payment has been successful', and then redirect t

How to Create WooCommerce Subscription Product via. REST API?

I am able to find the REST API docs for WooCommerce: https://woocommerce.github.io/woocommerce-rest-api-docs/#create-a-product but am unable to figure out how t

How to get Woocommerce product variation id into a PHP variable for use with custom add to cart urls?

Using Woocommerce, I need to be able to add a variable product to the cart within a custom add to cart URL, such as with the following example, where 88 is the

Get WooCommerce products from specific category

I am trying to insert a WooCommerce element to display "products" (courses) from a specific category into a page. I had also to hide these products for this spe