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

PayPal Payments is forcing all products to be sold individually #2462

Open
james-allan opened this issue Jul 25, 2024 · 3 comments
Open

PayPal Payments is forcing all products to be sold individually #2462

james-allan opened this issue Jul 25, 2024 · 3 comments
Labels
suggestion A suggestion for a change or new feature without too many details

Comments

@james-allan
Copy link
Contributor

james-allan commented Jul 25, 2024

Describe the Bug

In the #2265 PR, PayPal Payments includes code which forces all products to be sold individually.

Looking at the PR, it looks like the intention was for this to only affect subscription products, however it's impacting all product types.

To Reproduce

Based on user reports

  1. Go to Products > Add new
  2. Enter a product name and price.
  3. Go to the Inventory tab.
  4. Make sure that Sold individually is unchecked.
  5. Save the product.
  6. View the Inventory tab and notice that the product is sold individually.

Expected Behavior

The sold individually setting should reflect the user's choice, rather than being forced either way.

Actual Behavior

PayPal Payments is setting it to true via this code:

if ( ! $product->get_sold_individually() ) {
$product->set_sold_individually( true );
}

Note that that code runs before you've determined if it's a subscription product.

Note

I'm not even sure forcing this setting to be on for subscription products is correct either. If a store offers multiple payment methods, forcing all subscriptions to be sold individually because PayPal is installed seems a little heavy handed. Having said that, there's more to this as I could see customers placing multiple subscriptions in the cart and then having no eligible payment methods on stores that exclusively offer PayPal. Probably something to consider though.

Environment

  • WordPress Version
  • WooCommerce Version
  • Plugin Version
  • Browser [e.g. Chrome, Safari] and Version
  • Any other plugins installed

Additional Details

System status
<!--If applicable, paste the system status here. Please ensure you redact or remove any identifying information. -->
@InpsydeNiklas
Copy link
Member

Hello @james-allan, the issue you mentioned was resolved in PR #2400 and is included in the latest 2.8.2 version of the plugin. Therefore, it should not be an ongoing problem.

The sold individually setting should reflect the user's choice, rather than being forced either way.

We understand the importance of allowing users to configure their product settings freely. However, when users connect a subscription-type product with a PayPal subscription plan, we must enforce certain limitations. PayPal does not support all of the subscription customizations available in WooCommerce once the plan is created.

Forcing the "sold individually" setting was not an easy decision and initially did have some unintended side effects. However, it is meant to only be applied when the subscription product is actively connected to a PayPal subscription which requires manual user input.
The alternatives we explored, such as disabling the PayPal buttons with a message about unsupported cart configurations, provided a less optimal buyer experience. Forcing this setting simplifies our implementation and prevents invalid cart configurations, for example, by hiding the quantity sliders. This approach enhances compatibility and offers a smoother checkout process for customers using PayPal for subscriptions.

We are working on better communicating the limitations that come with the PayPal Subscriptions feature from the admin UI, so users can make informed decisions about their subscription setups and have more visibility on the upgrade path to PayPal Vaulting, which does not have these limitations.

@james-allan
Copy link
Contributor Author

james-allan commented Jul 26, 2024

Thanks @InpsydeNiklas for the insights. You all are much closer to the product and PayPal requirements so I'll leave those decisions up to you. I had a feeling there was more to it, and it sure sounds like it. :)

the issue you mentioned was resolved in PR #2400 and is included in the latest 2.8.2 version of the plugin. Therefore, it should not be an ongoing problem.

We'll double check and make sure the user cannot replicate on the latest version.
I was trying to replicate it today myself and I was able to, however there's a couple of hoops you need to jump through.

  1. Add a product.
  2. Select a Subscription type.
  3. Check the PayPal connection box.
Screenshot 2024-07-26 at 12 03 46 PM
  1. Save.
  2. Change the product type back to a simple product.
  3. Save.
  4. At this point the product's sold individually setting is stuck.

While this is unlikely, once the _ppcp_enable_subscription_product meta is saved on the product, you cannot change the sold individually setting. I also cannot change the product back to a subscription and uncheck the PayPal connection box and save, that's also stuck on.

@InpsydeNiklas
Copy link
Member

Thanks for your feedback! While this scenario should not happen often, it probably still justifies extending the condition with a check for a subscription-type product. We'll look into that!

@InpsydeNiklas InpsydeNiklas added the suggestion A suggestion for a change or new feature without too many details label Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion A suggestion for a change or new feature without too many details
Projects
None yet
Development

No branches or pull requests

2 participants