Questions tagged [woocommerce]

WooCommerce: a WordPress plugin. For how-to-use questions, ask their support team. It's mostly open source. On-topic questions: programming which changes or extends WooCommerce behavior. Questions about 3rd party plugins should be asked directly to the plugin support.

is a commercially supported open source available for .

It allow you to freely sell products from your WordPress site. WooCommerce is enterprise-level quality and is built in , , and .

WooCommerce It is now owned by its parent company Automattic.

Before submitting a question

  • Ensure you have the latest versions of WordPress, your theme and all plugins.
  • Check for theme or plugin conflicts. This includes switching to a default WordPress theme such as Twenty Seventeen and disabling all other plugins.
  • Remember, Stack Overflow is not an official support channel for WooCommerce. That support channel is here.

System Status Report
It may help to have a look at the System Status Report to detect some problems and warnings. This can be found in your WordPress dashboard and going to WooCommerce > System Status.

Useful Links


Related Tags

32907 questions
15
votes
1 answer

Display product post type advanced custom field on recent orders template and admin orders (woocommerce)

I’m trying to display the fields I have created in the recent order template of WooCommerce and I’m not very knowledgeable in PHP. I have created a field called sessions and registered as a product post type. Once a user purchase a product I want…
clestcruz
  • 1,081
  • 3
  • 31
  • 75
15
votes
1 answer

How to add woocommerce custom order status?

I have added new custom order status to woocommerce by using following function. // Register New Order Statuses function wpex_wc_register_post_statuses() { register_post_status( 'wc-custom-order-status', array( 'label' => _x( 'Shipping…
NNKK
  • 247
  • 4
  • 12
15
votes
1 answer

how to use session in woocommerce pages like we use normal php session?

How can i store my data in woocommerce session and used it anywhere in woocommerce pages(like thankyou page,processing mail page). 2nd i just have to send a unique code in woocommerce email(both admin and user). How to do it? Thanks in advance
Anil Tomar
  • 165
  • 1
  • 1
  • 5
15
votes
4 answers

WooCommerce - send custom email on custom order status change

I added a custom status wc-order-confirmed: // Register new status function register_order_confirmed_order_status() { register_post_status( 'wc-order-confirmed', array( 'label' => 'Potvrzení objednávky', 'public' => true, …
user1049961
  • 2,656
  • 9
  • 37
  • 69
15
votes
2 answers

WooCommerce require registration to buy

I need to require a user registration before buying a product. Right now, when you add a product to the cart, then in the check out you can fill all the fields with your information but without a wordpress login. There is a simple option to create…
markobarna
  • 189
  • 2
  • 2
  • 7
15
votes
2 answers

woocommerce: add value to a product attribute

How do I add value to a woocommerce attribute through code? I have created an attribute called 'Dispatch time' (taxonomy: pa_dispatch) and now I want to add value to a particular product's Dispatch attribute. How to do this programmatically?
Nagendra Rao
  • 7,016
  • 5
  • 54
  • 92
15
votes
4 answers

Get customers name in confirmation email

I am working with Woocommerce and I am about to make the order confirmation email. It want the mail to say: "Hi [customers name]" How do you get Woocommerce to print the customers name?
Frederik Skøt
  • 163
  • 1
  • 1
  • 5
15
votes
4 answers

Removing payment gateways from WooCommerce

I have a WooCommerce shop (running local) but I want to remove the payment gateways. The customer should be able to place an order without paying any cent, I will send them an invoice manually. I can not really find where to disable this, it seems…
Arko Elsenaar
  • 1,689
  • 3
  • 18
  • 33
15
votes
3 answers

Automatically importing products into Woocommerce

I am trying to find a way to automatically import products into Woocommerce. I was wondering if someone had any experience with this, whether using a CSV or directly writing to the database.
Soucrit
  • 323
  • 1
  • 4
  • 17
14
votes
2 answers

Add a discount programmatically to an Order in Woocommerce 3.2+

In woocommerce, we can add a discount to any order using Coupons feature (fixed amount, percent amount…). Is it possible to add discount amount to any order programmatically where the discount amount can be any amount? Any help will be…
Pankaj Verma
  • 415
  • 1
  • 4
  • 15
14
votes
3 answers

Remove "(optional)" text from checkout fields in Woocommerce 3.4+

I was previously using this answer to hide checkout fields based on chosen shipping method, it worked fine until an update (3.4.2 current version) I think not sure what has changed but it doesn't work as intended anymore. Previously when local…
Abu Nooh
  • 846
  • 4
  • 12
  • 42
14
votes
4 answers

Change the default selected payment gateway in Woocommerce

I have two different payment gateway (stripe and bank transfer) in Woocommerce checkout page. But "Bank transfer" (bacs) is always auto selected by default. Here is screenshot of the payment gateways on my checkout page: I would like to change…
14
votes
1 answer

GET a coupon code via URL and apply it in WooCommerce Checkout page

I have a WooCommerce website and when customer add-to-cart a product, it is get redirected to checkout page, so cart page is not accessible. I would like to apply coupon via URL (GET) on checkout page, with something like…
developerme
  • 1,845
  • 2
  • 15
  • 34
14
votes
5 answers

Delete a product by ID using PHP in WooCommerce

Since there is a command: wp_insert_post() shouldn't there be a command: wp_delete_post() Seems like it does not exist, what is an alternative that you use when you have the ID of a product in the database and you want to delete it?
dimitrisr
  • 185
  • 1
  • 1
  • 6
14
votes
6 answers

Reorder Woocommerce checkout fields

I am trying to reorder the billing fields on the checkout page but everything I tried so far is not working. Here is the snippet I am currently trying: add_filter("woocommerce_checkout_fields", "order_fields"); function order_fields($fields) { …
Yahya Hussein
  • 8,767
  • 15
  • 58
  • 114