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

Convert EDD plugins from POST to GET #40

Merged
merged 1 commit into from
Dec 15, 2022

Conversation

jessedyck
Copy link
Contributor

Checklist:

  • I've read the Contributing page.
  • I've created an issue and referenced it here.
  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

Description

Updated EDD plugins, Polylang and WPAll Import, to use GET requests when calling the software licensing API to get the URL of the download. Fixes #27

How has this been tested?

✅ Tested installing WP All Import with valid key
🚫 Polylang was not tested - I don't have a license. Would be great to get that tested prior to merging.

Types of changes

  • Bug fix

plugins/PolylangPro.php Show resolved Hide resolved
plugins/WpAiPro.php Show resolved Hide resolved
plugins/WpAiPro.php Show resolved Hide resolved
public function get( $url = '', $args = array() ) {
$query_string = '';

$curl_handle = curl_init();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jessedyck Have you tested this on Windows? I remember facing an issue with the POST request.

@junaidbhura
Copy link
Owner

Thanks a bunch for your PR, @jessedyck !

Could you please elaborate in what environments / Operating Systems you've tested your changes?

@junaidbhura junaidbhura merged commit 7071f53 into junaidbhura:master Dec 15, 2022
@junaidbhura
Copy link
Owner

@jessedyck I've merged this PR and made the updates. However, it looks like WP All Import / Export have recently started using Cloudflare, so we're unable to download from the command line at the moment, so I've not created a release just yet!

@jessedyck
Copy link
Contributor Author

That may explain a change in behaviour I noticed recently; any request would return a download link, regardless of license key. That doesn’t match the expected behaviour from the EDD docs though. I haven’t had a chance to revisit, but perhaps it was cloudflare caching the response then.

I’ll try to take a peak soon!

@junaidbhura
Copy link
Owner

That's odd @jessedyck I went ahead and did a release: https://github.com/junaidbhura/composer-wp-pro-plugins/releases/tag/1.5.0 hoping to see if I'd have luck in CI environments, but no dice!

I hope they fix the Cloudflare thing soon.

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

Successfully merging this pull request may close these issues.

Failed to execute (9) unzip -qq -o 'web/app/plugins/wp-all-import-pro// ...
2 participants