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

Woocommerce payment gateways: Stacked Account page & Stacked Pricing page with the wrong links #617

Open
japolea opened this issue Mar 2, 2023 · 0 comments

Comments

@japolea
Copy link

japolea commented Mar 2, 2023

🐞 bug report

Behavior:

  • What are the issues? (*)
    There are 3 major issues for Woocommerce payment gateways on Freemius:
  1. Stacked Account Page: stacked iframes of each Woocommerce payment gateway on the page
  2. Stacked Upgrade Page: stacked iframes of each Woocommerce payment gateway on the page
  3. Wrong upgrade links: the first plugin on the list gives its URL to the rest
  4. Double charging

So Woocommerce payment gateways have this slug structure
/wp-admin/admin.php?page=wc-settings&tab=checkout&section=gateway

So when you activate multiple Woocommerce payment gateway plugins hosted on Freemius, they all share the same account URL and upgrade URL since the slug is "similar" for all payment gateways and only the section query parameter changes for each payment gateway ID

So the generated URLs from the _fs->get_account_url() or _fs->get_upgrade_url() becomes
1 account URL for all Woocommerce payment gateways: /wp-admin/admin.php?page=wc-settings-account
1 upgrade URL for all Woocommerce payment gateways: /wp-admin/admin.php?billing_cycle=annual&page=wc-settings-pricing

Then more issues arise, iframes of each plugin account page and upgrade page stack on top of each other on the same page.

Then the payment links are the same for all plugins, usually the buy button or URL becomes the top plugin URL on the list.
So if you click to buy a different plugin, you end up buying the first plugin.
The same behavior extends to the account page which is also stacked with links and some data pointing to the first plugin.

Also there's double charging more often with these stacked iframes.

  • Screenshots
    1 account URL for all Woocommerce payment gateways: /wp-admin/admin.php?page=wc-settings-account
    account URL for all Woocommerce payment gateways

1 upgrade URL for all Woocommerce payment gateways: /wp-admin/admin.php?billing_cycle=annual&page=wc-settings-pricing
upgrade URL for all Woocommerce payment gateways

  • What is the expected behavior?
    Each plugin should have its own upgrade URL and account URL where the only iframe in there is for the selected plugin with its own data and links like how it works when the main slug of the plugin isn't query parameter based like for Woocommerce payment gateways (/wp-admin/admin.php?page=wc-settings&tab=checkout&section=)

Versions: (*)

  • Freemius SDK Version: N/A but 2.4+
  • WordPress Version: N/A but 6.0+
  • PHP Version: N/A but 7.0+

Plugin / Theme: (*)

  • Name: N/A but ex: Checkout with Zelle on Woocommerce
  • Slug: N/A but ex: /wc-zelle
  • Freemius ID: N/A but ex: 9162

Additional Information:

  • Same behavior on at least 10+ sites
  • Browser Type: (*) Chrome
  • Browser Version: (*) 100+
  • OS: (*) Windows Desktop
  • Stack Traces: N/A

Note: (*) indicates required information. Without this information, your issue may be auto-closed.

You can find your Freemius SDK version at /freemius/start.php

You can find your Freemius product ID in the Freemius dashboard: SETTINGS -> INTEGRATION.

Do not modify the titles or questions. Simply add your responses to the ends of the questions.
Add more lines if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant