Category "woocommerce"

How to solve Duplicate entry '0' for key 'PRIMARY' in Wordpress?

my website running perfect but today 1 order is placed by the customer, and I am getting this error in my website. Here is the screenshot of error error is her

Custom discount rule in WooCommerce

In WooCommerce (WordPress) I have a bundle which contains product A and product B and I set it to add to cart separately (When adding this bundle to cart, produ

Can I use a WooCommerce function without any WooCommerce page?

I've WooCommerce installed on my WordPress site. After this, I've created a custom page template that has nothing to do with WooCommerce. Within this template,

woocommerce category rating based on reviews

Right now i use this code, it calculates all products ratings in one category and shows it as 5/5 (200 reviews). The 200 reviews are gathered from all 10 produc

Add custom text under order details on WooCommerce My account view order pages

I need to add some custom text under the Order Details section of the WooCommerce view-order page. My goal here is to add some additional instructions: To

WooCommerce Subscriptions: Remove role on cancelled subscription

I am using a third-party plugin to assign a role to a user when they purchase a subscription - there are two different roles depending on purchase (silver, gold

Add image caption under image thumbnail in WooCommerce single product page

I'm trying to add the image caption under each image thumbnail on WooCommerce single product page. Here you can see where I want the text to be shown (presently

Auto select first available options from a variation on WooCommerce variable products

I have a t-shirt product that has a choice of sizes and colours. After selecting of one variation I would like the first available option to be auto selected in

wordpress function breaks wp-admin

I've created a function in my custom WooCommerce site. This works great on the frontend, but wp-admin breaks. Wp-admin shows a http-500 error. This is the funct

Bulk import products into Woocommerce using WP WC CLI

I'm trying to add 1000's of products into my woocommerce store using wp wc cli via my datasource which will give me the data in the following JSON format: {

Manage independently the decimal number of the price of each product [duplicate]

I develop an online store with woocommerce and I would like to display the price of the product with 3 decimals when the price contains 3 (exa

WooCommerce single product page by Woolentor : Related product customize

I use WooCommerce, Woolentor, and WooCommerce subscriptions to construct a website. I'm trying to use the 'WL:Related Product' widget for Woolentor's Single Pro

WooCommerce how to update order meta data key value with woo rest api 3

I've been searching around but can't get it to work. Using the api v3 I'm able to get all orders and everything is ok, but now I need to be able to update a met

Is there a way to remove the "Delete note" function?

In Woocommerce order notes there is a link to delete order notes. Is there a way to remove this ability to remove that ability?

retrieve simple products and product_variation with corcel

In larvel I'm using corcel and with the help of this comment I'm trying to retrieve only simple products and variations of variable products. $type = array('pro

Update Order custom Field value with WooCommerce REST API

I am trying to update the Order custom field value lworder. I used the below code but I did not find any update. Can anyone please help me with this? $api_respo

Add a custom text for a particular product on specific email notification in Woocommerce

I want to add an extra text "There is an offer in this particular item etc" only for a particular product(Product Id:1) in customer-completed-order.php in WordP

Reorder attribute dropdown terms in Woocommerce single variable products

In the Woocommerce single variable product pages, I would like to change the order of the sizing options on the related drop-down menu. Actually It is like thi

WC show notice on add to cart in product pages

I want to add a notice that lets the customers know when they've added a product to their cart that might not be what they intended. So when a product is added

How do you add custom field to woocommerce product attribute

I want to include a simple in the edit attribute form. (/wp-admin/edit.php?post_type=product&page=product_attributes&edit=55) Is this possible? Everyt