wordpress-sdk
wordpress-sdk copied to clipboard
Woocommerce payment gateways: Stacked Account page & Stacked Pricing page with the wrong links
🐞 bug report
Behavior:
-
What are the issues? (*)
There are 3 major issues for Woocommerce payment gateways on Freemius:
- Stacked Account Page: stacked iframes of each Woocommerce payment gateway on the page
- Stacked Upgrade Page: stacked iframes of each Woocommerce payment gateway on the page
- Wrong upgrade links: the first plugin on the list gives its URL to the rest
- Double charging
So Woocommerce payment gateways have this slug structure /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=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
1 upgrade URL for all Woocommerce payment gateways: /wp-admin/admin.php?billing_cycle=annual&page=wc-settings-pricing
-
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§ion=)
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.