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

Solutions: WP CLI commands and premium plugin utlities #22

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

arunshenoy99
Copy link
Member

Story: https://jira.newfold.com/browse/PRESS0-1715

Proposed Changes

  1. Three new custom WP-CLI commands:
    • wp installer auto_upgrade_extended_yith_plugins for automatically upgrading extended YITH plugins to their premium versions.
    • wp installer upgrade_extended_yith_plugin <extended_yith_plugin_slug> for manually upgrading a single YITH plugin to it's premium version.
    • wp installer install_premium_plugin <premium_slug> [--activate] for manually installing and/or activating a premium plugin.
  2. All these commands are linked to independently usable functions, such as in cases like https://jira.newfold.com/browse/PRESS0-1714.

For now, I have added nfd_slug_yith_paypal_payments_for_woocommerce as the premium plugin slug. We will need to replace this extended-to-premium map with the correct premium entitlement slugs later on.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Video

Checklist

  • I have read the CONTRIBUTING doc
  • I have viewed my change in a web-browser
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Lint is failing because I have not tagged a release on wp-module-pls.

includes/Services/PluginInstaller.php Show resolved Hide resolved
includes/Services/PluginInstaller.php Show resolved Hide resolved
includes/Services/PluginUpgrader.php Outdated Show resolved Hide resolved
includes/Services/PluginUpgrader.php Show resolved Hide resolved
@wpscholar
Copy link
Member

@arunshenoy99 I think this looks fine for now. I assume we need to update the appropriate slugs before this is merged?

Also, please take a look at my comment here and make sure the PLS module is set up to handle this: https://jira.newfold.com/browse/PRESS0-1714?focusedId=14843090&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14843090

@arunshenoy99 arunshenoy99 merged commit 125e82b into solutions Oct 8, 2024
1 of 2 checks passed
@arunshenoy99 arunshenoy99 deleted the enhance/plugin-upgrader branch October 8, 2024 08:20
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.

3 participants