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
18
votes
7 answers

Hide 'out of stock' products in Woocommerce

Under "Products" and "Inventory" I have checked the following setting: "Hide out of stock items from the catalog" Now all sold out products are hidden in the archive/category view. So far so good. The problem is that the hidden (out of stock)…
janlindso
  • 1,225
  • 3
  • 16
  • 41
18
votes
4 answers

WooCommerce - change order status with php code

I am trying to change order status in WooCommerce, but I encountered no luck so far. $order instance is created successfully (I know it because echo $order->status; works fine, $order_id is also correct. $order->status = 'pending'; simply doesn't…
NakedCat
  • 852
  • 1
  • 11
  • 40
18
votes
5 answers

woocommerce get list of attribute values

I'm using woocommerce on wordpress to create a simple shop site and I've added a couple attributes to a product. These are namely, size and color. Under size I have a variety of values including Small, Medium and Large. Same with color ie. Red,…
clueless
  • 839
  • 1
  • 10
  • 24
17
votes
6 answers

How to add a custom working Shipping Method in WooCommerce 3

I have successfully created a new shipping method and given it support for shipping zones. However when I come to select the method from the dropdown to add it to the zone it does not appear in the 'selected methods list'. I recorded a screencast…
jhob101
  • 432
  • 2
  • 6
  • 15
17
votes
5 answers

How to add Custom Description field in Shipping methods (Backend)

I want to add a custom field in Shipping Zone page under shipping method, it will be a text input, the user will able to add a custom message and I'll show that message in the front end. I noticed it saves the data in…
Raunak Gupta
  • 10,412
  • 3
  • 58
  • 97
17
votes
4 answers

WooCommerce: Assigning an endpoint to a custom template in my account pages

This function adds a tab named "Special Page" into "My Account" tab list: add_filter( 'woocommerce_account_menu_items' , 'jc_menu_panel_nav' ); function jc_menu_panel_nav() { $items = array( 'dashboard' => __( 'Dashboard',…
Dario Ferrer
  • 804
  • 1
  • 8
  • 22
17
votes
2 answers

change shop URL in woo-commerce

Right now www.mysite.com/shop list all product. I want to list other content in shop page (say only category) and in www.mysite.com/shop-product to show content what is shown right now in shop page. I have tried changing Permalink in edit post page…
Ashwani
  • 692
  • 2
  • 6
  • 16
17
votes
3 answers

AJAX add to cart button not working on custom query loop product woocommerce

I'm building a custom e-commerce website using woocommerce and I'm having some trouble fixing the "add to cart button". Whenever I add the multiple amounts in the input box/quantity box it only increments or adds one item to the cart. This only…
clestcruz
  • 1,081
  • 3
  • 31
  • 75
17
votes
4 answers

WooCommerce Variations as Radio Buttons

Is it possible within WooCommerce to change the variations dropdown into radio buttons without having to work with a plugin? I would like to have the following setup on the variations section: 1 liter (10€) 2 liter (20€) 3 Liter (25€) The price at…
Sam De Decker
  • 307
  • 1
  • 3
  • 12
17
votes
4 answers

How to get attribute name instead of slug in variation?

I need to get attribute from woocommerce product variation. $terms = get_post_meta($value['variation_id'], 'attribute_pa_color', true); This code is giving me an attribute slug instead of name. How can I get attribute name? Thank you so much in…
Pupik
  • 391
  • 1
  • 2
  • 13
17
votes
2 answers

WooCommerce create an order programmatically and redirect to payment

For WooCommerce i'm lookin' for a solution to create an order programmaticly (my site just has 1 homepage with some fields) to order. After products are added with a checkbox i'd like to create an order and redirect to the payment method. Creating…
Ronn0
  • 2,249
  • 2
  • 21
  • 36
17
votes
4 answers

Woocommerce checkout page show shipping address first then billing address?

In checkout page of Woocommerce i need to change functionality of address means first i need shipping address fields then billing address fields. Billing is shown first and then shipping shown if checkbox checked like below here see image. Billing…
Mukesh Panchal
  • 1,956
  • 2
  • 18
  • 31
17
votes
9 answers

woocommerce - Get Cart Total as number

I want to get total price of cart in my woocommerce plugin. I want to get it as a float number like so: 21.00 but I don't know how to get it. My code outputs weird results, this is my exact code: $total =…
ononononon
  • 1,033
  • 4
  • 14
  • 25
17
votes
8 answers

Woocommerce: Which hook to replace deprecated "woocommerce_add_order_item_meta"

Need to add custom meta to order items. Googled it and most articles says to use "woocommerce_add_order_item_meta" hook. This hook is deprecated in the newest version 2.3.7. Someone, please tell me which hook to use…
user3339988
  • 404
  • 2
  • 5
  • 12
17
votes
4 answers

WooCommerce get_sku(); on products variations in order

I'm building a custom function for Woocommerce where I need to get product SKU and if 'variation' product get variation specific SKU. What I currently have is the following: // Query order data $order = new WC_Order($order_id); $items =…
Mathias Asberg
  • 3,562
  • 6
  • 30
  • 46