Completed

Add a front-end functionality to a woocommerce checkout page that updates the back-end via Ajax

Published on the April 26, 2023 in IT & Programming

About this project

Open

Our Wordpress page has a woo-commerce integration, which adds a checkout page that has a widget called "checkout-order-review " containing the checkout price and the payment options (payment options are radio inputs).

The requirement is: add a functionality that changes the shipping price depending on the selected payment method.

I've created the JavaScript file that listens to a change in the payment inputs and saves the selected one to a variable that can be then sent with an AJAX request. The issue is that my functions.php file isn't responding to the ajax request even though the js script is enqueued. In theory, the 'wp_ajax_' hook for listening to the AJAX request, but it isn't working correctly.

The AJAX is needed since I need to send the selected value in the front-end to the back-end for recalculating the checkout price and posting it to the database.

I need a developer that can help me debug and solve this issue or propose a different approach to this problem, I'm an entry level developer and I would like to understand the debugging process and the solution applied since I'm still learning how php works with Wordpress.

Category IT & Programming
Subcategory Wordpress
What is the scope of the project? Plugin installation
Is this a project or a position? Project
I currently have I have specifications
Required availability As needed

Delivery term: April 28, 2023

Skills needed