Auto Populate Email Subject from Woocommerce Product

Amateur with programming (and love it), long time reader and first time poster. I have set up a Woocommerce cart here at http://centrowireless.com/inventory/. I have a Contact for Price button...

Woocommerce: Programmatically Update Item In Cart

I need to programmatically and dynamically change the price of an item in the cart. I’ve tried varying combinations of Woocommerce action hooks, the cart and session objects, but nothing quite...

WooCommerce - auto update total price when quantity changed

I've been searching for several days but I have no answer yet. Basically, I'm trying to replace woocommerce standart "update cart" button with ajax call, which automatically updates order total...

WooCommerce shipping methods not working for logged-in users?

I have developed a custom build on woocommerce. All is fine except for the checkout page. The site ships to UK only, and i have Flat Rate shipping enabled. However, on the checkout page there are...

Discount for Certain Category Based on Total Number of Products

In WooCommerce, I have a category of products called Samples, each sample costs $2.99. But I'd like a way to automatically change the cost of the Samples from $2.99 to $1 when 5 Samples are added...

Woocommerce: Display Product Variation Description on order page

I am trying to display the product variation description in the order detail page and in the order email. Following this example...

Add custom fields selected values of a variation in Woocommerce cart object

In WooCommerce I am using variables products which variations are based on date availability. In backend, I have added successfully 2 custom fields with custom prices (adult/children) on each...

Hook woocommerce price in backend order edition

I need to change item product prices in Woocommerce Backend Order. I tried tu use the following hook, but I have a problem trying to obtain the order id. Any suggestion? Thanks in...

Custom cart items price calculation for Woocommerce Bookings

I want to know how to update the price calculation depending on some internal coding. This is the price that needs to go into the cart item and thus far, the cart item shows only the base cost of...

Replace specific cart item based on product quantity in Woocommerce

I am trying to change the cart content based on the quantity of a product in the cart. I only have 5 products in the shop: Product_1 => 1 panel, Product_2 => 12 panels, Product_3 => 18...

Turn Woocommerce shop into catalog for geolocated countries?

I'm trying to turn my woocommerce shop into catalog mode depends on country.I only want to show products' price and add to cart function in United States. I'm trying to achieve this by using a...

Move the variation description to the Woocommerce product variable description

What I am trying: Show the Variation Description of the Child of a Variable Product on single product page in the product tab description area. In WooCommerce and variable products the parent has...

Woocommerce Sort by Attribute Value

In my store I have a attribute called "pieces" that phpmyadmin lists as "pa_pieces" in wp_postmeta. My store lists toys so I want to be able to sort it by the amount of pieces/the attribute. So by...

Add Woocommerce product price (+ currency) with add to cart in a page

I've set up a add-to-cart button of a woocommerce product on my landing page. Is there a way to also show the price of the product on that page (or any page)? The class of the woocommerce price...

WooCommerce How can I show the matching product variation when an attribute filter is selected?

In WooCommerce, have an Attribute called Location that contains different areas. Then each product has that Attribute added and it's used for Variations. There is a Variation with a specific price...

Custom calculated shipping costs based on shipping class in WooCommerce

After updating Woocommerce to the latest version 3.5.7 last night, the checkout is freezing if country is switched from US to Canada on the checkout page. If we go back to the cart page, an error...

How to do WC meta_query on variable products via their product variations?

On WooCommerce products, I have a custom meta field called "amazon_price" and I wanna hide the products from showing on front-end if no price is set for this "amazon_price" custom field. I used...

Woocommerce woocommerce_checkout_create_order_line_item doesn't appear to be firing

In my scenario, a subscription order is added to the cart of the current user with additional data used to calculate additional data about the subscription such as the next renewal dates,...

Woocommerce get variations API does not always return newly created variations

On woocommerce, I add a new variation to a product. I have a hook configured for product.updated to my API. Once the hook is received on my API for the updated product, I do a get variations API...

WooCommerce set attributes programmatically based on variations

Need some help with WooCommerce adding variations to product attributes. I created an attribute called Data ( pa_data ), this attribute stores terms from a custom field added with ACF, this field...

Add product attribute to Woocommerce's blocks in Gutenberg

EDIT I: I have found the file where the old plugin Woocommerce Blocks sets the blocks:...

WooCommerce checkout - Update Shipping cost

I am using Sendy API to calculate the shipping cost in my checkout page based on the location one chooses from the dropdown managed by Google Location API. everything else works fine except for my...

Empty Array on first argument for woocommerce_add_cart_item_data filter hook

I am getting an empty array from the woocommerce_add_cart_item_data filter when a product is added to the shopping cart. Example added to functions.php of WordPress theme; function...

Magento 2.3.5: Add product to cart with custom options and price

Why is the documentation of Magento this bad? It's pretty difficult to build a plugin for it. Anyways I try to add a product with custom price and options. In WooCommerce it's extremely easy to do...

Custom Coupon Error on WooCommerce - "Uncaught Error: Call to a member function get_cart() on null..."

I am attempting to create a custom coupon code in WooCommerce using PHP which essentially discounts the price of each item in the cart with the tag name 'main' to 10. It does this by counting the...

Automatic product insert via soap on WooCommerce product creation

I have a billing program and to connect that program to my online store in wordpress i used a plugin but now i've been requested to do the following update : Whenever we create a product on...

woocommerce_after_calculate_totals not working to update cart item price

what I am trying to achive is if user adds a particual product in cart its price should change to zero Here is the simple code snippet which I am using to update cart item price...

Set a custom add to cart price via the URL (GET) in WooCommerce

I am developing a wordpress and woocommerce-based website where information on cooking-related training is provided and various kitchen materials are sold. Those who want to participate in the...

WooCommerce custom Ajax add to cart: How to set a custom price?

I am trying to add a product from an on_click event at checkout. That product's price is calculated dynamically with an external API so it is registered as having a price of 0 in woocommerce...

How to fix "Uncaught Error: Call to a member function get_tax_class() on null" in WooCommerce?

I've an ecommerce app that's was working fine some days ago. After I update the wordpress and woocommerce plugin, the app suddenly stopped working. I think that's something about the plugin that I...