Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide extensibility to allow for compatibility with marketplace plugins #1515

Open
helgatheviking opened this issue Apr 2, 2021 · 5 comments · May be fixed by #2359
Open

Provide extensibility to allow for compatibility with marketplace plugins #1515

helgatheviking opened this issue Apr 2, 2021 · 5 comments · May be fixed by #2359
Labels
component: payment request buttons Issues related to Payment Request Buttons - e.g. Apple Pay, Google Pay status: needs confirmation
Milestone

Comments

@helgatheviking
Copy link
Contributor

helgatheviking commented Apr 2, 2021

Is your feature request related to a problem? Please describe.
This is a follow up to #566 at the request of @loranallensmith

There is explicit Product Addons support built in now it seems, but otherwise, there's currently no way for the request buttons to work on the single product page for more advanced product types or customized products. This impacts 2 of my plugins: Name Your Price and Mix and Match Products...(as well as Product Bundles, Composites, and probably still some of the other plugins listed in #566)

For example, in Name Your Price... a user enters a price and that becomes the price of the product, which is currently not possible. So there are several blockages for working with the payment request buttons:

  1. Customer can click the buttons when the price entered is not valid (therefore checking out without meeting the minimum... or in the case of Mix and Match when the container's contents are not selected)
  2. There's no way to pass the form inputs via the ajax request to the backend. Product Addons fields are hard-coded.
  3. There's no way to modify the price as a new product object is instantiated and is added to cart without any cart params

Describe the solution you'd like
I think multiple things need to happen to make this a flexible framework that can be extended as needed by other plugins. This is just the minimum things I can think right now:

  1. Enable/disable the request buttons when the product form is not validated. (Very cursory start here)
  2. Customize the popup alert message that is triggered when the product cannot yet be added to the cart
  3. serialize all <form> inputs to relay via ajax
  4. Some kind of filter in ajax_add_to_cart() that allows for the manipulation that allows for the manipulation of $cart_item_data param in add_to_cart() *This may not be necessary... would need to see if the hooks in add_to_cart() itself are sufficient if the form data gets passed along in the $_POST but seems like to could be helpful.

Describe alternatives you've considered
I've added code to my plugins to explicitly disable the payment request buttons for products using my plugins, which seems a shame because that's a cool feature. I am willing to write the compatibility code on my side but currently there's no framework to make that possible.

While cross-compatibility is never fun, it's my opinion that compatibility between plugins in the marketplace is a huge selling point.

@v18 v18 added the component: payment request buttons Issues related to Payment Request Buttons - e.g. Apple Pay, Google Pay label Apr 2, 2021
@loranallensmith
Copy link

Cross linking over to woocommerce/woocommerce#29535 for discoverability and potential coordination. 🙂

@helgatheviking
Copy link
Contributor Author

helgatheviking commented May 26, 2023

Hi all... I had a customer asking about this today. And given that this issue originally dates back to 2018... is there any update?

@Snaacks
Copy link

Snaacks commented Nov 23, 2023

Hi there! I have a customer in ZD-7352678 asking about Apple Pay compatibility with Smart Coupons, it looks like the original issue was closed in favor of this one, is there any movement on this or should we advise customers it's not compatible at this point? Original issue that led me here

@tarunparswani26
Copy link

We also encountered an issue with our Smart Coupons plugin affecting custom fields on the checkout page. When utilizing GPay/Apple Pay, the Checkout form data does not include information from these custom fields.

More details here (#2969)

For now, we have fixed the same issue in the Smart Coupons plugin by implementing some workaround.

But for a proper fix, would be better if appropriate hooks are added in the GPay/Apple Pay checkout functions or any other way which would enable extending checkout form data by third-party plugins just like the default WooCommerce plugin does. Any ETA for this?

Copy link

github-actions bot commented Jan 2, 2025

Hi,
This issue has gone 150 days (5 months) without any activity. This means it is time for a check-in to make sure it is still relevant. If you are still experiencing this issue with the latest version, you can help the project by responding to confirm the problem and by providing any updated reproduction steps.
Thanks for helping out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: payment request buttons Issues related to Payment Request Buttons - e.g. Apple Pay, Google Pay status: needs confirmation
Projects
None yet
6 participants