Skip to content

Commit

Permalink
Renaming method to make it more intuitive
Browse files Browse the repository at this point in the history
  • Loading branch information
wjrosa committed Feb 28, 2025
1 parent 24937b3 commit b7e5f25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const upeMethods = getPaymentMethodsConstants();
* @param {Object} upeConfig The UPE configuration.
* @return {Object} The UPE payment method configuration.
*/
export const upeElement = ( paymentMethod, api, upeConfig ) => {
export const groupedCheckoutElement = ( paymentMethod, api, upeConfig ) => {
let iconName = paymentMethod;

// Afterpay/Clearpay have different icons for UK merchants.
Expand Down
4 changes: 2 additions & 2 deletions client/blocks/upe/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
populateOrderAttributionInputs,
} from 'wcstripe/blocks/utils';
import './styles.scss';
import { upeElement } from 'wcstripe/blocks/upe/upe-element';
import { groupedCheckoutElement } from 'wcstripe/blocks/upe/grouped-checkout-element';

const api = new WCStripeAPI(
getBlocksConfiguration(),
Expand All @@ -45,7 +45,7 @@ const methodsToFilter = [
Object.entries( paymentMethodsConfig )
.filter( ( [ method ] ) => ! methodsToFilter.includes( method ) )
.forEach( ( [ method, config ] ) => {
registerPaymentMethod( upeElement( method, api, config ) );
registerPaymentMethod( groupedCheckoutElement( method, api, config ) );
} );

// Register Express Checkout Elements.
Expand Down
2 changes: 1 addition & 1 deletion client/classic/upe/payment-processing.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function createStripePaymentElement( api, paymentMethodType ) {
gatewayUPEComponents[ paymentMethodType ].elements = elements;
gatewayUPEComponents[
paymentMethodType
].upeElement = createdStripePaymentElement;
].groupedCheckoutElement = createdStripePaymentElement;

// When email or phone is updated and Link is enabled, we need to
// update the payment element to update its default values.
Expand Down

0 comments on commit b7e5f25

Please sign in to comment.