Skip to content

Commit

Permalink
Update function names
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Sep 27, 2024
1 parent a29d7c8 commit f339946
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 2 additions & 7 deletions includes/Services/PluginUpgrader.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,11 @@ public static function upgrade_extended_yith_plugins() {
// Array to store the status of each plugin's upgrade process
$yith_plugins_upgrade_status = array();

// Loop through each YITH plugin and use the upgrade_single_extended_plugin function for the upgrade
foreach ( $yith_plugins_to_upgrade as $index => $extended_slug ) {
// Call the single plugin upgrade function and get the status
$upgrade_status = self::upgrade_single_extended_plugin( $extended_slug );

// Store the result of the upgrade in the array
$upgrade_status = self::upgrade_extended_yith_plugin( $extended_slug );
$yith_plugins_upgrade_status[ $extended_slug ] = $upgrade_status;
}

// Return the array containing the upgrade status for each plugin
return $yith_plugins_upgrade_status;
}

Expand All @@ -50,7 +45,7 @@ public static function upgrade_extended_yith_plugins() {
*
* @return array Contains the status of the upgrade process with 'upgraded' and 'message' keys.
*/
public static function upgrade_single_extended_plugin( $extended_slug ) {
public static function upgrade_extended_yith_plugin( $extended_slug ) {
// Define the list of extended YITH plugins and their corresponding premium versions.
// TODO: Replace the dummy entitlement slug 'nfd_slug_yith_paypal_payments_for_woocommerce' with actual entitlement slugs.
$yith_plugins_to_upgrade = array(
Expand Down
6 changes: 3 additions & 3 deletions includes/WPCLI/Handlers/InstallerCommandHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ public function auto_upgrade_extended_yith_plugins() {
*
* ## EXAMPLES
*
* wp installer upgrade_single_extended_yith_plugin <extended_yith_plugin_slug>
* wp installer upgrade_extended_yith_plugin <extended_yith_plugin_slug>
*
* @param array $args Arguments passed from the command line. First argument is the plugin slug.
*
* @return void
*/
public function upgrade_single_yith_plugin( $args ) {
public function upgrade_extended_yith_plugin( $args ) {
$plugin_slug = $args[0];

$status_info = PluginUpgrader::upgrade_single_extended_plugin( $plugin_slug );
$status_info = PluginUpgrader::upgrade_extended_yith_plugin( $plugin_slug );
$status_json = wp_json_encode(
array(
'slug' => $plugin_slug,
Expand Down

0 comments on commit f339946

Please sign in to comment.