Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Incompatible Extension Notice #8185

Closed
paymentplugins opened this issue Jan 13, 2023 · 5 comments · Fixed by #8201
Closed

Incompatible Extension Notice #8185

paymentplugins opened this issue Jan 13, 2023 · 5 comments · Fixed by #8201
Labels
status: blocker Used on issues or pulls that block work from being released. type: bug The issue/PR concerns a confirmed bug.

Comments

@paymentplugins
Copy link

Describe the bug

On the block editor page for the cart and checkout blocks, the following notice is shown for all express payment methods:

The following extensions are incompatible with the block-based checkout. [Learn more(opens in a new tab)](https://woocommerce.com/document/cart-checkout-blocks-support-status/)

Stripe Apple Pay
Stripe Google Pay

To reproduce

Install the Payment Plugins for Stripe WooCommerce plugin. Once the plugin is installed, navigate to the Checkout Block editor page. Click on the express payment methods block.

Steps to reproduce the behavior:

  1. Install the Payment Plugins for Stripe WooCommerce plugin
  2. Once the plugin is installed, navigate to the Checkout Block editor page
  3. Click on the express payment methods block.

Expected behavior

The express payment methods for GPay and Apple Pay are supported so that notice should not show.

A clear and concise description of what you expected to happen.

Screenshots

Screenshot 1

WordPress (please complete the following information):

  • WordPress version: 6.1
  • WooCommerce version: 7.3
  • WooCommerce Blocks version: 9.3.0
  • Site language: EN

Additional context

The issue appears to be related to how the incompatiblePaymentMethods property located in the redux store 'wc/store/payment' is being set.

In file assets/js/data/payment/reducers.ts and case statement ACTION_TYPES.SET_AVAILABLE_PAYMENT_METHODS, the incompatiblePaymentMethods is set based on a filter. If the payment method ID isn't in the list of paymentMethods, it's added. The problem with that logic is the action.paymentMethods object consists only of the payment methods added via the registerPaymentMethod function.

The payment methods added via the registerExpressPaymentMethod function are ignored and thus added to the list of incompatible payment methods.

Here is the line of code

Kind Regards,
Payment Plugins

@paymentplugins paymentplugins added the type: bug The issue/PR concerns a confirmed bug. label Jan 13, 2023
@senadir
Copy link
Member

senadir commented Jan 15, 2023

@tarhi-saad would you be kind to assist in resolving this?

A couple of notes:

  • I'm not sure why this is being handled on the data store level? it seems editor only and isn't related to the flow of Checkout.
  • To my understanding the current flow is: get php payment plugins - get JS payment plugins = incompatibilite payment plugins, maybe such logic should be expanded to account for express payment only plugins.

@gigitux gigitux added the status: blocker Used on issues or pulls that block work from being released. label Jan 16, 2023
@tarhi-saad
Copy link
Contributor

tarhi-saad commented Jan 16, 2023

Hello @paymentplugins! 👋 Thank you for reporting this bug! 🙌 We created a PR that fixes and shows the correct incompatible payment gateways. It will be included in this week's release. We want to double-check with you regarding the Credit Card payment method (the default payment gateway). Is this one still incompatible with the Cart & Checkout Blocks?

image

@paymentplugins
Copy link
Author

paymentplugins commented Jan 16, 2023

Hi @tarhi-saad,

All of the payment methods provided in our Stripe plugin are compatible with WooCommerce Blocks, whether that be via the Express Checkout section or the payment methods section located toward the bottom of the block checkout.

I would image that if a gateway is registered via the registerPaymentMethod or registerExpressPaymentMethod they would be considered compatible.

Kind Regards,
Payment Plugins

@tarhi-saad
Copy link
Contributor

tarhi-saad commented Jan 16, 2023

Thank you, @paymentplugins, for the reply! 🙌 You are right! If a gateway is registered using registerPaymentMethod or registerExpressPaymentMethod, it should be recognized by our plugin.

I was testing the other payment gateways. All of them were recognized by our plugin. Then I simply disabled and re-enabled the Credit Card gateway, and it was fixed! This may be another bug that isn't related to the incompatibility notice. For now, I'm not sure if this is an issue from our end. It looks like the registerPaymentMethod of the Credit Card doesn't run the first time the plugin is installed or runs at an early stage, and our plugin doesn't get the necessary information. This happens only when installing the Payment Plugins for Stripe WooCommerce plugin for the first time. We can't reproduce this bug by simply removing and re-installing the plugin.

@paymentplugins
Copy link
Author

Hi @tarhi-saad

Thanks for getting back to us. This may be something specific to the Block Editor because on the frontend checkout block, the credit card gateway always loads if it's enabled.

We'll take a closer look at the Block Editor and try to replicate the behavior that you have reported.

Kind Regards,
Payment Plugins

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: blocker Used on issues or pulls that block work from being released. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants