Skip to content

Commit

Permalink
Deprecating additional public methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wjrosa committed Nov 26, 2024
1 parent 12a9fb1 commit cfb303a
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 1,855 deletions.
946 changes: 0 additions & 946 deletions assets/js/stripe-payment-request.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/stripe-payment-request.min.js

This file was deleted.

7 changes: 1 addition & 6 deletions assets/js/stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -834,12 +834,7 @@ jQuery( function( $ ) {
var savedTokens = selectedMethodElement.find( '.woocommerce-SavedPaymentMethods-tokenInput' );
var errorContainer;

var prButtonClicked = $( 'body' ).hasClass( 'woocommerce-stripe-prb-clicked' );
if ( prButtonClicked ) {
// If payment was initiated with a payment request button, display errors in the notices div.
$( 'body' ).removeClass( 'woocommerce-stripe-prb-clicked' );
errorContainer = $( 'div.woocommerce-notices-wrapper' ).first();
} else if ( savedTokens.length ) {
if ( savedTokens.length ) {
// In case there are saved cards too, display the message next to the correct one.
var selectedToken = savedTokens.filter( ':checked' );

Expand Down
17 changes: 0 additions & 17 deletions client/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,6 @@ export default class WCStripeAPI {
return new Stripe( key, options );
}

/**
* Load Stripe for payment request button.
*
* @return {Promise} Promise with the Stripe object or an error.
*/
loadStripe() {
return new Promise( ( resolve ) => {
try {
resolve( this.getStripe() );
} catch ( error ) {
// In order to avoid showing console error publicly to users,
// we resolve instead of rejecting when there is an error.
resolve( { error } );
}
} );
}

/**
* Creates a setup intent without confirming it.
*
Expand Down
2 changes: 0 additions & 2 deletions client/blocks/payment-request/apple-pay-preview.js

This file was deleted.

Loading

0 comments on commit cfb303a

Please sign in to comment.