Category "woocommerce"

Get specific attribute value by varation product id woocommerce

I want to get the attribute value for the variaton id, I tried something but show me the value for 1 month "1 luna". The 120E price is for 12 months. The varia

Apply woocommerce coupon only to the cart total, not to the tax line

I am working on a WooCommerce site. When I apply a coupon on the checkout page, it automatically applies to the tax as well. I only want the coupon code to app

WooCommerce - unset "<product> removed notice…" on cart page

actions and filters. On my WooCommerce site I get the following message when I remove a product from the shopping cart: "<product name>" removed. Undo?

Last order would be re-order in wooCommerce. How is it possible?

I am developing a woocommerce site that has 3 categories like vegetable, Fast food & Fish. vegetables are the main category of his eCommerce site. My client

Make Shipping Method fields Mandatory on Woocommerce checkout page

I'm sure that there is a quick bit of code out there that will solve this issue, but I'm struggling to find it. I have a WordPress/WooCommerce website set-up a

Change user role if checkout custom checkbox is checked in WooCommerce

I'm trying to add a custom function to my child-themes functions.php file where a checkbox is added to the bottom of the billing details form on the checkout pa

Changing currency on checkout with WooCommerce Multilingual Plugin

I'm trying to implement currency change on checkout with WooCommerce Multilingual Plugin. I need a country with COP and the rest of countries with USD. First I

woocommerce get_order_report_data to show order_item_id

I would like to show order_item_id by get_order_report_data() I can use the array to show product id and order id : array( '_product_id' => array(

Applying programmatically a coupon to an Order in WooCommerce3

I'm developing a plugin that creates an order directly (no cart) and applies a coupon. In version 3.0 of the woo API the function add_coupon() has been deprecat

Woocommerce redirect after add-to-cart error

I have being doing research for a few days but still cannot find an answer. I am using Woocommerce without the Single Product page. So I am using urls like htt

Additional price based on cart item count in WooCommerce

Based on "woocommerce change price in checkout and cart page" answer code that change the total price in checkout page, I have added some extra code to count th

Woocommerce shipping address is empty

the option on the site "Default to customer billing address" is selected but the shipping address is still empty. I tried to fix it with code add_action( 'w

How to skip cart page on woocomerce for certain products only?

I added this to my functions.php file : add_filter ('woocommerce_add_to_cart_redirect', 'woo_redirect_to_checkout'); function woo_redirect_to_checkout() { $che

Filter WooCommerce products with post__in and additional meta queries

I am trying to find products that are on sale (including product variations) in addition to another meta_query of price under X. The wc_get_product_ids_on_sale(

Custom WooCommerce shortcode to display product image gallery

I have been tasked with duplicating a WooCommerce product gallery in an internal page (not a product page). As such, I decided to create a Child theme and write

Woocommerce Show default variation price

I'm using Woocommerce and product variations and all my variations have a default variation defined. I would like to know, how I can find the default variation

Woocommerce set all products to featured products from mysql query

I have a woocommerce store and I try to select from Mysql all products and set them as "Featured" products or set them as Non "Featured" products. I have found

wc_print_notices is not displaying any messages in woocommerce pages?

I have used default woocommerce templates for shop, cart and single page. I have not removed any hooks either but also I am not getting any message. Any Idea?

WooCommerce: Add/display Product or Variation custom field everywhere

Currently using WordPress 5.1.1 and WooCommerce 3.5.7. My WooCommerce store has around 500 products, made up of simple and variable products. Each product natu

WooCommerce Additional Information - if empty, hide

I'm working on an eCommerce project at the moment. I'm using WooCommerce in WordPress. I've got ridden of the product data tabs and displayed product descripti