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
25
votes
2 answers

How to retrieve cart_item_data with WooCommerce?

During the add_to_cart function, there is a filter to add "cart item data". The filter is woocommerce_add_cart_item_data. I expected to store my custom plugin data in this, so that the data is stored relative to the item and multiple products can be…
Radley Sustaire
  • 3,382
  • 9
  • 37
  • 48
25
votes
4 answers

How to add / remove columns in Woocommerce admin product list

I want to customize the columns in Woocommerce admin area when viewing the product list. Specifically, I want to remove some columns, and add several custom field columns. I tried many solutions listed online, and I can remove columns and add new…
lilbiscuit
  • 2,109
  • 6
  • 32
  • 53
24
votes
1 answer

Add custom field to shipping zone form - Woocommerce

I am trying to add a select field to Woocommerce Shipping tab and to Shipping Zones section of it while creating a new shipping zone. I found this on official documentation of Woocommerce while searching for the solution. What I've tried so far…
24
votes
2 answers

Adding a product to cart with custom info and price

I have installed woocommerce to handle product input & checkout process of a wordpress shop. The shop page is custom built which allows the user to pick a product from a list and customise it which outputs a price in javascript based on information…
Kevin S
  • 1,067
  • 1
  • 10
  • 19
24
votes
3 answers

Adding custom field to product category

How can I add custom fields to product category? I have added custom field to product but I can't find any extension which provide facility to add custom field to product category.
Vidhi
  • 2,026
  • 2
  • 20
  • 31
24
votes
6 answers

How to install missing woocommerce pages from tools menu in woocommerce 2.1.5

I have recently installed WooCommerce 2.1.5 that skipped logout and change password links during pages install. In WooCommerce documentation, the WooCommerce team mentioned that there is a feature to add missing pages from tools menu but when I go…
aishazafar
  • 1,024
  • 3
  • 15
  • 35
23
votes
2 answers

Updating product stock programmatically in Woocommerce 3

I need so help. I'm trying to update the woocommerce product stock quantity programmatically. We have a vendor feed to us through some JSON. I can read the stock from the feed and can pull the data from the post meta correctly. I'm using the latest…
Dave
  • 343
  • 1
  • 4
  • 11
23
votes
1 answer

Change product prices via a hook in WooCommerce 3+

IN WooCommerce, I need to multiply all product prices by a number. So I have used the following (via a plugin): add_filter('woocommerce_get_regular_price', array( $this, 'my_custom_price'), 99); add_filter('woocommerce_get_price', array( $this,…
KronosL
  • 299
  • 3
  • 4
  • 11
23
votes
5 answers

WooCommerce Notice Messages, how do I edit them?

I'm trying to figure out where WooCommerce creates it's messages for when there is a success, error or notice in WooCommerce. I want to edit those messages to fit the scenario more neatly and also edit the HTML. Where are these messages located and…
Majo0od
  • 2,278
  • 10
  • 33
  • 58
23
votes
3 answers

Woocommerce get Product id using product SKU

I'm working on a separate templates page, which page gets woocommece product sku using custom field of wordpress post. i need to get product id of that sku for create woocommece object and do further things, here is my code. global…
Suneth Kalhara
  • 1,116
  • 4
  • 16
  • 40
22
votes
6 answers

How to get order items ids to get some product meta data?

I'm trying to extract item meta value from Woocommerce's orders by using: $data = wc_get_order_item_meta( $item, '_tmcartepo_data', true ); However, I can't find a way to get order_item_id as the first parameter (using get_items) global…
camelot
  • 301
  • 1
  • 3
  • 12
22
votes
2 answers

Remove item with $product_id - Woocommerce

Made a function where the customer get a product added to the cart when they reach a specific amount. Example of when customer reaches level 3 and get the product added. // Bonus products $product_1 = '4751'; $product_2 = '4752'; $product_3 =…
Mathias Asberg
  • 3,562
  • 6
  • 30
  • 46
22
votes
3 answers

Woocommerce - How to check product type in plugin

I'm pretty new to wordpress/woocommerce and just started playing with creating a custom plugin. So far I have I have added my custom woocommerce settings via the api. I've run into a problem where I want to add a custom field on a single product in…
Cloud_Ratha
  • 588
  • 1
  • 6
  • 14
22
votes
10 answers

Need Woocommerce to only allow 1 product in the cart. If a product is already in the cart and another 1 is added then it should remove the previous 1

I think this code should work but not exactly sure where to place it. Everywhere I have tried has failed so far... add_action('init', 'woocommerce_clear_cart'); function woocommerce_clear_cart() { global $woocommerce, $post, $wpdb; $url =…
Swof
  • 221
  • 1
  • 2
  • 4
22
votes
5 answers

woocommerce get attribute terms

In Woocommerce you can add global product attributes and terms. So for instance: Size (attribute) small (term) medium (term) large (term) This is product independent. You can then select from the pre defined attributes on a product. I need to get…
phantomdentist
  • 393
  • 1
  • 4
  • 9