Merge pull request #2492 from woocommerce/PCP-3517-apple-pay-shipping-callback-is-not-working

Apple Pay: Fix the shipping callback (3517)
This commit is contained in:
Emili Castells 2024-08-07 13:56:32 +02:00 committed by GitHub
commit 3d5c15b343
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,6 +1,5 @@
import ErrorHandler from '../../../../ppcp-button/resources/js/modules/ErrorHandler'; import ErrorHandler from '../../../../ppcp-button/resources/js/modules/ErrorHandler';
import CartActionHandler from '../../../../ppcp-button/resources/js/modules/ActionHandler/CartActionHandler'; import CartActionHandler from '../../../../ppcp-button/resources/js/modules/ActionHandler/CartActionHandler';
import { isPayPalSubscription } from '../../../../ppcp-blocks/resources/js/Helper/Subscription';
class BaseHandler { class BaseHandler {
constructor( buttonConfig, ppcpConfig ) { constructor( buttonConfig, ppcpConfig ) {
@ -24,7 +23,7 @@ class BaseHandler {
} }
shippingAllowed() { shippingAllowed() {
return this.buttonConfig.product.needsShipping; return this.buttonConfig.product.needShipping;
} }
transactionInfo() { transactionInfo() {
@ -76,13 +75,6 @@ class BaseHandler {
document.querySelector( '.woocommerce-notices-wrapper' ) document.querySelector( '.woocommerce-notices-wrapper' )
); );
} }
errorHandler() {
return new ErrorHandler(
this.ppcpConfig.labels.error.generic,
document.querySelector( '.woocommerce-notices-wrapper' )
);
}
} }
export default BaseHandler; export default BaseHandler;