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
19
votes
6 answers

How to stream creation of a JSON File?

Am trying to create a JSON file from a large dump of a database query, and works when I set a LIMIT to 100000 rows being returned, but when I want all rows to be returned, it just goes to a 502 Error (The page request was canceled because it took…
Solomon Closson
  • 6,111
  • 14
  • 73
  • 115
19
votes
3 answers

Create programmatically a variable product and two new attributes in WooCommerce

I would like to programmatically create a variable product ("parent" product) with two new variante attributes - all that from a WordPress plugin (so no HTTP Request to an API). These two variante attributes should also be created on the fly. How…
Cedric
  • 5,135
  • 11
  • 42
  • 61
19
votes
3 answers

How can I list best selling products in woocommerce

I would like to consider best-selling product in this loop : 'product', 'posts_per_page' => 1, 'product_cat' => 'cat', 'order' => 'DEC' ); $loop4 = new WP_Query( $args4 ); while ( $loop4->have_posts()…
Mr Yar
  • 339
  • 1
  • 3
  • 10
19
votes
2 answers

Applying coupons using woocommerce rest api

I am developing an application using WooCommerce rest API v3. Now I'm trying to integrate coupons from my WooCommerce website to my application. I'm creating order and applying coupons like this "coupon_lines":[{ 'code'=>'coupon1', …
SatheeshCK17
  • 523
  • 6
  • 17
19
votes
1 answer

WooCommerce get order total

I am currently trying to get the order total of a checkout for WooCommerce so it can be sent through with a Google AdWords conversion. Here is the code:
Kyon147
  • 738
  • 2
  • 11
  • 28
19
votes
6 answers

How get variation's stock quantity woocommerce

I'm developing a theme for wordpress and woocommerce and need to show a variation's stock.

get_stock_quantity(); ?>

I read How to get the stock quantity of an article from woocommerce?, but this code…
SeiyaJapon
  • 534
  • 1
  • 7
  • 21
19
votes
4 answers

WP_Query Woocommerce products that belong in distinct multiple categories only tax_query

I'm using WP_Query for Woocommerce products in attempt to query products in a particular category. This is the syntax that worked for me - $args = array( 'posts_per_page' => -1, 'product_cat' => 'category-slug-here', 'post_type' =>…
RCNeil
  • 8,581
  • 12
  • 43
  • 61
19
votes
8 answers

Woocommerce: How to remove "Archive" in title?

I'm trying to remove the word "Archive" from the page title. How to remove it? By adding a filter? Example: My collections Archive | My sitename
MrRoman
  • 793
  • 2
  • 7
  • 17
18
votes
2 answers

How to check WooCommerce thank you page

In Wordpressis_page() can check page by ID,name or by slug but how can we check WooCommerce thank you page whether its a part of checkout page. Also We have a lot of WooCommerce conditional tags but cant find something solve my issue for example I…
Firefog
  • 3,094
  • 7
  • 48
  • 86
18
votes
2 answers

Woocommerce: Get all orders for a product

In the Woocommerce API I see a method wc_get_orders WooCommerce Order Functions In the mentioned args I do not see an argument in which I could provide a product ID or Object to limit order results only for that specific product. Is there a way I…
Fahad Sohail
  • 1,818
  • 4
  • 21
  • 33
18
votes
2 answers

Detecting if the current user has an active subscription

I'm developing a website in WordPress with WooCommerce. I'm using additionally WC Paid Listings and WooCommerce Subscriptions plugins to handle my work. The problem is when a user with "subscriber" role with an active subscription login tries to…
Knight
  • 343
  • 1
  • 4
  • 16
18
votes
1 answer

WooCommerce : Add custom Metabox to admin order page

I am currently successfully adding a field to my WooCommerce product pages which is showing the value: in the cart (front end), on checkout page (front end), on order page (front end), and in admin individual order page (back end). The problem:…
MV-123
  • 367
  • 2
  • 3
  • 14
18
votes
3 answers

How can I get the order date, in WooCommerce?

I can see inside class-wc-admin-cpt-shop_order.php there are some functions that are pulling together the order information for display in WooCommerce. However, I don't see anywhere where the date can be used ... Because WooCommerce uses wp_posts to…
Ke.
  • 2,484
  • 8
  • 40
  • 78
18
votes
2 answers

get_terms gives "invalid taxonomy" from plugin

I'm building a plugin for woocommerce and i have some troubles. I'm trying to get all avalible product categories. the code simply looks like this: $cats = get_terms('product_cat', array('hide_empty' => 0, 'orderby' => 'ASC', 'parent'…
gubbfett
  • 2,157
  • 6
  • 32
  • 54
18
votes
3 answers

How to check if a page is category or product in woocommerce?

I'm trying to use is_category in woocommerce.php which is not working. I want to print the title according the page. IF a page is category page then will print woocommerce_page_title() and if a page is product then should print the_title(). And…
user3777827
  • 344
  • 1
  • 5
  • 16