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

How to get WooCommerce order details

In WooCommerce from the following line code: $order = new WC_Order( $order_id ); How can I get WooCommerce order details from the order id?
Faisal Ijaz
  • 1,812
  • 2
  • 12
  • 23
103
votes
9 answers

Get custom product attributes in Woocommerce

In Woocommerce, I am trying to get product custom attribute values but I fail miserably and I don't get anything. So I tried: global $woocommerce, $post, $product; $res =…
ShintoTuna
  • 3,677
  • 8
  • 29
  • 36
79
votes
5 answers

WooCommerce: Finding the products in database

I'm creating a website using WooCommerce and I want to restrict the available products to users depending on the postcode that they enter in the search form on my home page. To be able to achieve that I'll have to specify the conditions of each…
T.Doe
  • 1,969
  • 8
  • 27
  • 46
76
votes
9 answers

Get WooCommerce product categories from WordPress

I am trying to get the product categories from WooCommerce through a function in my WordPress theme function get_me_list_of($atts, $content = null) { $args = array( 'post_type' => 'product', 'posts_per_page' => 10, 'product_cat'…
Tester
  • 2,887
  • 10
  • 30
  • 60
73
votes
6 answers

Get cart item name, quantity all details woocommerce

I am trying to send the woocommerce cart items to third party shipping tool. I need the item name, quantity and individual price to be sent to the third party. How can this be achieved? $items = $woocommerce->cart->get_cart(); foreach($items as…
Philomath
  • 1,145
  • 4
  • 18
  • 28
67
votes
4 answers

Woocommerce get products

I used the following code to get the list of product categories form WooCommerce in my WordPress website:
Tester
  • 2,887
  • 10
  • 30
  • 60
62
votes
3 answers

WooCommerce - Remove downloads from menu in my account page

I would like to remove downloads menu from my account page. How can I do this? Is it any hook to remove a specific item from the menu? Thanks.
techiva.blogspot.com
  • 1,170
  • 3
  • 17
  • 37
61
votes
7 answers

Woocommerce, get current product id

I'm currently working on a WooCommerce theme and attempting to add a sidebar to the product detail page. I've been able to get the sidebar added (specifically, this one:…
shparkison
  • 943
  • 1
  • 8
  • 20
59
votes
15 answers

How can I get customer details from an order in WooCommerce?

I have a function that does this: $order = new WC_Order($order_id); $customer = new WC_Customer($order_id); How can I get customer details from this? I have tried everything in the documentation, but somehow, just some details are present, but the…
Alfonso Embid-Desmet
  • 3,561
  • 3
  • 32
  • 45
59
votes
6 answers

WooCommerce - get category for product page

For my WC product pages, I need to add a class to the body tag so that I can perform some custom styling. Here's the function I'm creating for this... function my_add_woo_cat_class($classes) { $wooCatIdForThisProduct = "?????"; //help! //…
ban-geoengineering
  • 18,324
  • 27
  • 171
  • 253
59
votes
4 answers

WooCommerce return product object by id

I am creating a custom theme for woocommerce and I need to be able to create a mini product display. I am having problems finding documentation on the woocommerce api. I have a comma delimited list of product IDs that I need to iterate through and…
58
votes
9 answers

How to get featured image of a product in woocommerce

Please tell me where I am going wrong . Product featured image is not showing up. $args = array( 'post_type' => 'product', 'posts_per_page' => 80, 'product_cat' => 'profiler', 'orderby' => 'rand' ); $loop = new WP_Query( $args ); while (…
Amar Singh
  • 5,464
  • 2
  • 26
  • 55
56
votes
3 answers

How to display Woocommerce product price by ID number on a custom page?

I'm trying to display a price of a product in Woocommerce, on a custom page. There is a short code for that, but it gives product price and also adds an "Add to cart button", I don't want the button, i just want to get the price of a specific…
MosesTheTool
  • 695
  • 1
  • 5
  • 7
50
votes
3 answers

WooCommerce payment complete hook

After a long search, I found this post: WooCommerce hook for "after payment complete" actions which talks about creating web hooks in WooCommerce to notify a script to do...something...doesn't matter too much what. I've also read everything I can…
Aaron Trumm
  • 679
  • 1
  • 5
  • 7
50
votes
8 answers

WooCommerce products showing “Out of stock” message when not actually out of stock

Having an issue with a client website where products are randomly displaying "This product is currently out of stock and unavailable." The thing is that we don't have inventory tracking turned on, all products should be in stock all the…
Ian
  • 3,266
  • 4
  • 29
  • 37
1
2 3
99 100