Skip to content

Commit

Permalink
fix: improve function name for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
laurelfulford committed Sep 18, 2024
1 parent efcc01c commit 013161e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modal-checkout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ domReady(
/**
* Get updated cart total to update the "Place Order" button.
*/
function returnUpdatedCartTotal() {
function getUpdatedCartTotal() {
let cartTotal;
$.ajax({
url: newspackBlocksModalCheckout.ajax_url,
Expand Down Expand Up @@ -159,7 +159,7 @@ domReady(
// Modify button text to include updated price.
const tree = $( '<div>' + processOrderText + '</div>' );
// Update the HTML in the .cart-price span with the new price, and return.
tree.find('.cart-price').html( returnUpdatedCartTotal, function() {
tree.find('.cart-price').html( getUpdatedCartTotal, function() {
return this.childNodes;
} );
processOrderText = tree.html();
Expand Down

0 comments on commit 013161e

Please sign in to comment.