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 example #17

Open
MWDelaney opened this issue Mar 30, 2023 · 4 comments
Open

WooCommerce example #17

MWDelaney opened this issue Mar 30, 2023 · 4 comments

Comments

@MWDelaney
Copy link
Contributor

MWDelaney commented Mar 30, 2023

Leaving this placeholder to capture work figuring this one out. At the moment I can't even figure out how it makes its update requests, but if it's capable of updating automatically in the WordPress UI, we should be able to form that request ourselves, right? ... right?

@Stormrunn3r
Copy link

Hi MWDelaney,

I'm guessing this would be for a plugin from woocommerce.com right? If so I've found a recently stale repo of another company that has something that worked for them. Maybe it gives some ideas 😄

@ethanclevenger91
Copy link
Contributor

Specifically, the WIP in that project is here: https://github.com/pronamic/woocommerce-subscriptions/blob/main/.github/scripts/release.php

That could be based on a dated version of the Helper. A sort of entry point for the version in 7.6.1 can be found here: https://github.com/woocommerce/woocommerce/blob/7.6.1/plugins/woocommerce/includes/admin/helper/class-wc-helper-updater.php#L329

@ethanclevenger91
Copy link
Contributor

ethanclevenger91 commented May 5, 2023

All requests have to be authenticated with an access token that gets saved into the wp_options table. Details here. That WIP repo saves those as env vars, but not sure how they generate them. I guess you could set up a dummy WP install at some URL and then save that URL and the generated access codes as env vars. Might be good enough, but if it's an OAuth-style thing, a token may rotate with some frequency.

@MWDelaney
Copy link
Contributor Author

That's disappointingly complicated. Another option would be to get the data from a running site with wp-cli. I'll keep thinking about it.

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

3 participants