Category "woocommerce"

Get the product with highest price in Woocommerce

I need to retrieve the product with highest price in whole database. I've tried this but doesn't work. $args = [ 'limit' => '1', 'orderby'

Change the alert text on add to cart action without selected variation in Woocommerce

in Wordpress I'm using Woocommerce v3.3.5 and in single product pages for variable products, When I click the add to cart button while I don't select a variatio

Cannot retrieve order_id from database with SQL query

We are trying to update WC orders based on an external script. However, the script is unable to acquire the order_id for some reason. I tried to run the SQL que

Get WooCommerce product variation attribute terms in admin products general box

I display the id and sku of each variable product in the general tab - of the wp admin product data box with the following code. Any idea how to get the the var

Display Brand Name Above Product Title in Woocommerce Cart, Checkout Page, Orders and Email Notification

Using the functions below I've applied a custom field to products added in Woocommerce cart and checkout page also to orders and notification email. My questi

Set quantity minimum, maximum and step at product level in Woocommerce

I'm using "set minimum and maximum allowable product quantities to be added in WooCommerce Cart" to require a minimum and maximum quantity order. Now, i need to

Get Woocommerce CoCart API response(add, update, delete) after promotion applied

I would like to get the responses of each route (add to cart, update cart and delete cart) already applied to the promotion. What I face now is it only response

Is there a way to direct logging to file instead to stdout?

How could I redirect any logging to files to stdout/err/.. ? (to be specific I have rsyslog going) Basically, I would like what WC_Log_Handler_File produces to

Show product count in archive page Title in WooCommerce

How to show in the archive page TITLE, the number of products, in WooCommerce? Thanks!

Show product count in archive page Title in WooCommerce

How to show in the archive page TITLE, the number of products, in WooCommerce? Thanks!

Decimal quantity step for specific product categories in WooCommerce

I would like to adjust quantity step for specific product categories to allow decimal numbers (0.5 steps specifically). A bit like in Set quantity minimum, maxi

Add rows to Single product Additional information table in WooCommerce 3.6

I am trying to add a row to Single product Additional information table. Actually is there any hooks or filter to do this? I have searched the hook but can'

Woocommerce show more variables in admin area

In Woocommerce within the product edit screen, under variables, I currently have products which have up to 52 options, this is displayed over 4 pages, however I

woocommerce_wp_select options array from product attribute terms

I am trying to create a drop down list box in woocommerce but have it populated with data from the database. I have the majority of the code working but the po

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