WooCommerce: How to display fields from the "Product Add-ons" extension?

I'm using the [Product Add-ons][1] extension for WooCommerce, which allows custom fields for products. This automatically displays on the single product template. By some trial and error with the...

Woocommerce - Product Page - How to create AJAX on "Add To Cart" button?

I want to make an "Add To Cart" button on a product page that would work with AJAX. How can I do it? When I add to cart on a product page - it refreshes the page, how can I make it work by...

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...

WooCommerce add a custom fee using ajax to cart totals on checkout page

I am trying make it when user changes the Shipping address select dropdown it dynamically add a fee to cart totals using ajax.I could able to to get the value but when select a another state it...

WooCommerce - Ajax Add To Cart and Update Total

I'm working on a website that allows users to add products to cart from the home page. I've followed a few resources online from their website and other SO questions which allows me to add...

How to process the user generated price in woocommerce

I have a requirement for a product order in woocommerce. I created a custom template for ordering the product. In that template, the user has to enter dimensions such as length, width, and height....

Add Tip input by customer to WooCommerce checkout page

I am developing a food ordering WooCommerce store. I am trying to add an input field or a grouped button to let the customer add delivery tips to checkout total. Backend Part: I wrote an action...

Sitepoint "Redeem code" tutorial for Woocommerce problems

I am trying to implement "redeem coupon" functionality in a Woocommerce store, I have already found useful tutorial, but I can't make it work properly. This is the tutorial. What I've already...

Jquery trigger for remove product from woocommerce cart ajax

Looking to run some jQuery when a product is removed from the cart in woocommerce. I thought this would do it, but it's not happening. Any ideas? jQuery( document.body ).on( 'updated_wc_div',...

Get a dynamic calculated fee based on postcode input in Woocommerce

I trying to pass a variable in woocommerce_cart_calculate_fees hook, but this code doesn't work. When I try to pass static value within a variable it works. Here is my...

Ajaxify header cart items count in Woocommerce

I'm creating a custom woocommerce integrated theme for wordpress. I have a blob on the top that displays the total number of items in the cart, I want to update this blob using Jquery (w/o...

Add and manage Product custom upload field in Woocommerce 3

I am trying to add a file upload along with radio inputs in a custom woocommerce page; where all the products are showing in a list view. The Custom Page CODE: <?php /* Template Name: Custom...

Change product button based on product category in Woocommerce archive pages

I have a jQuery script which successfully retrieves data from local storage and then returns to a PHP function (within a child theme). Within this function I have an if/else block which I want...

Handle data received after payment with custom Woocommerce form based gateway

I'm trying to add a custom payment gateway in my Woocommerce website. The flow will be like this: After the user clicks on "Place order" button, he is redirected to the hosted payment page (HPP)...

Woocommerce aJax apply coupon code in checkout page

I am moving the WooCommerce Coupon input field bellow order total by editing the review-order.php Checkout Page using this method but the problem is applying coupon with ajax is not working. SO my...

Woocommerce remove button remove the wrong product

I'm coding a woocommerce website. In my shop page I've managed to insert the "remove from cart button" code from the cart page, but when I click on the button, it's the first product (in...

How can I make the WooCommerce "Add to cart" button switch to a quantity increment button when clicked?

I would to like modify the WooCommerce "Add to cart" button behavior as follows: When the "Add to cart" button is clicked, the selected item is added to the cart and the button changes to a...

Extra carrier field for shipping methods in WooCommerce cart and checkout

Inspired from https://stackoverflow.com/questions/49159445/shipping-carrier-custom-fields-validation-in-woocommerce-checkout-page/49163797#49163797 answer code, I use following code which displays...

Ajax add to cart on WooCommerce product page

I am trying to get AJAX to work for the Add to Cart button on the WooCommerce product pages of my site. I am using the below code snippet to get AJAX functionality and it all works as it should,...

WooCommerce - add products to cart without reload via ajax

I did some digging and could not find an answer to my question. I am using ajax to send a request to my php which uses the function WC()->cart->add_to_cart($product_id). This works to add the item...

How to disable tax being charged on shipping in WooCommerce?

I have configured my Woo-based shop to NOT charge any taxes on shipping: I do have a table for Zero Tax rate configured: however it still does during the checkout: as is apparent in the...

Change position of “Place order” form row Woocommerce Checkout

I have a little problem. I want to change the position of "Place order" under "Order review". "Place order" form row: "Order review" and where i want to put the "place order: This is the "place...

Change custom Ajax Add to Cart button text after add to cart in WooCommerce

I use a code that changes the text and style of the "Add to Cart" button for a product if the item is already in the cart. Many thanks to 7uc1f3r for this. /* for single product */ add_filter(...

WooCommerce Adding multiple items to the cart with Ajax

I use latest version of Wordpress and Woocommerce. I have some JavaScript that loops over DOM elements of class .selectable and grabs the product_id attribute from the ones with class .selected,...

Add extra packaging options through radio buttons in WooCommerce checkout

Based on Update fee dynamically based on radio buttons in Woocommerce checkout anser code. I'm trying to make it work with different packaging options on WooCommerce checkout. The idea is to be...

Woocommerce how to ajaxify add to cart button for variable products using custom html radio buttons instead of dropdown menu - no plugin

I'm trying to put all of the pieces of this puzzle together. I've been reading all of the questions and answers on this subject for the past 3 days. So the general blueprint that i'm following is...

WooCommerce shopping mini cart isn't updated after ajax adding items

I made adding multiple items with quantity to the cart using AJAX. After adding a product, the mini cart isn't updated, but WC_AJAX :: get_refreshed_fragments () is called in function.php and I...

Add notice with ajax when user select local pickup shipping method on WooCommerce cart and checkout pages

I'm making a plugin for an client, integrated with WooCommerce, and I need to add a notice, with wc_add_notice, when a local pickup shipping method is selected on cart and checkout pages. I've...

Apply coupon code on Woocommerce checkout page with AJAX

I moved the Woocommerce coupon form by editing the review-order.php based on this method I would like to know if it's possible to make the coupon code apply with AJAX (without reloading the page)...

Woocommerce wrong fragments passed back from woocommerce_add_to_cart_fragments

I'm creating a custom WooCommerce cart and updating the quantity of a cart item works correctly. The only problem is that it doesn't automatically refresh, only works after page load. My current...