Category "woocommerce"

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

WooCommerce create API webhook (POST method)

I would like to connect API but, to be honest I'm not so experienced in api connections, the API instructions are clear, but I don't know how to begin in WordPr

WooCommerce coupon usage restriction by allowed user roles

we need to make an automatic discount coupon to be applied if the current user role is ( vendor ), we achieved that by creating a normal coupon then used the sn

Adding custom fields to woocommerce checkout page disables place order button function

I'm trying to add this basic code to add a new field to the check out page. However, it seems to disable the place order button. Here is the code: /** * Add th

Set shipping class based on Tag or Attribute Woocommerce

I need to update Shipping class based on Tag, example all products with tag "Fresh" shoud have shipping class "fresh" . i try this, but without results.. add_ac

Woocommerce Checkout - Add conditional field required if one field is filled

I want to add a conditional requirement on the Checkout page. Because a lot of people fill the Name of Company without they are a company. And I want to add to

Woocommerce Rest API: woocommerce_product_invalid_image_id

Woocommerce version: 4.1.0 I am trying to create a product with categories and images via the API but I get this error : {"code":"woocommerce_product_i

Display specific shipping method if woocommerce product has specific acf field value

I need display specific shipping methods only if specific acf checkbox in product is checked. I created custom field viac ACF plugin with name "zpusob_prepravy"

Add restriction to WooCommerce coupons by allowed user ID

Let's say i'm using this code to create a coupon: $coupon_code = 'CODEOFF'; $amount = '10'; $discount_type = 'percent'; $coupon = array(

Retrieve filled in Add-on data from booking/product

I'm writing a plugin to intercept the creation of bookings in wordpress. To have all the booking information I need to access the information filled in the addo

args[max_input] woocommerce if statement confused

Cant seem to figure this out with if statements. Wanting it to show QTY 4 unless stock available is less than 4.. So far I have this.. function wpse_292293_quan

How to export WooCommerce order

I have one scenario , in which I only have a database dump. I have to write SQL query in PHPMyAdmin to get ALL the WooCommerce orders , and then EXPORT CSV from

WooCommerce Product Addons - append image to product addon field

I actually struggling with WooCommerce Product Addons plugin. The result which I want is to give possibility that woocommerce product addon fields (checkboxes t

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

We have a client who is shipping Subscription products (which are actually Composite products with four to five Bundles of products in them) and they offer deli

display WooCommerce “Add to cart” button with short-code [add_to_cart ] dynamically

I use WooCommerce short-code [add_to_cart ] inside a widget sidebar On WordPress website to display “Add to cart” button on product pages (wanted to

WooCommerce: how to add suffix to attribute value? [duplicate]

We are building a wine-shop and have a few typical attributes like alcohol, sugar, acid that have values. These attributes are measured in uni