3e96caaa3a
* Add extensionsConfig when registering a payment method The extension config has its own canMakePayment where extensions can add callback using a payment method's name. * Make canMakePayment a getter on PaymentMethodConfig Because extensions can register canMakePayment callbacks for a payment method before it is registered we need to transform canMakePayment into a getter so that it's always recalculating it's value based on the registered callbacks/ * Rename extension related config and method * Format comments * Add an extension namespace to registerPaymentMethodExtensionCallback utility This commit changes the API for how extensions will register their own callbacks to canMakePayment, so that they can add their namespace and also callbacks for multiple payment methods. * Format comments * Update assets/js/blocks-registry/payment-methods/payment-method-config.js Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/blocks-registry/payment-methods/registry.js Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/blocks-registry/payment-methods/payment-method-config-helper.js Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/blocks-registry/payment-methods/payment-method-config-helper.js Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/blocks-registry/payment-methods/registry.js Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Fix eslint warning * Handle errors at registerPaymentMethodExtensionCallbacks level * Update assets/js/blocks-registry/payment-methods/registry.js Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Fix formatting issues Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com> |
||
---|---|---|
.. | ||
block-components | ||
payment-methods | ||
index.js |