-
Notifications
You must be signed in to change notification settings - Fork 206
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
🚀 enhance: StoreGrowth listed to the admin setup wizard recommendation plugins #2512
base: develop
Are you sure you want to change the base?
Conversation
WalkthroughThe pull request introduces significant changes to the Dokan Setup Wizard's handling of recommended plugins. It adds a new Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
includes/Admin/SetupWizard.php (2)
940-940
: Update version placeholder in docblock.Replace
DOKAN_SINCE
with the actual version number where this feature was introduced.- * @since DOKAN_SINCE + * @since 3.9.0
937-947
: Add safety check for is_plugin_active function.The
is_plugin_active
function is not always available in WordPress. Consider adding a safety check.protected function is_store_growth_active() { + if ( ! function_exists( 'is_plugin_active' ) ) { + require_once ABSPATH . 'wp-admin/includes/plugin.php'; + } return is_plugin_active( 'storegrowth-sales-booster/storegrowth-sales-booster.php' ); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
assets/images/store-growth-logo.png
is excluded by!**/*.png
📒 Files selected for processing (1)
includes/Admin/SetupWizard.php
(5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: e2e tests (3, 3)
- GitHub Check: e2e tests (2, 3)
- GitHub Check: e2e tests (1, 3)
- GitHub Check: api tests (1, 1)
🔇 Additional comments (4)
includes/Admin/SetupWizard.php (4)
696-703
: LGTM! Clean implementation of StoreGrowth plugin recommendation.The integration follows the same pattern as other recommended plugins and maintains consistency in the codebase.
732-749
: LGTM! Appropriate reordering of plugin checks.The WooCommerce Conversion Tracking check is correctly positioned after the StoreGrowth plugin check.
755-755
: LGTM! Improved plugin description clarity.The updated description better communicates Texty's compatibility with multiple platforms.
789-804
: LGTM! Well-structured StoreGrowth plugin installation handling.The implementation follows the established pattern for plugin installations and includes proper sanitization of user input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
includes/Admin/SetupWizard.php (2)
702-716
: LGTM! Minor nitpick on the asset path constant.The StoreGrowth plugin integration is well-structured and follows the established pattern. However, there's a typo in the constant name
DOKAN_PLUGIN_ASSEST
(should beDOKAN_PLUGIN_ASSET
).Consider fixing the typo in the constant name in a future update:
- 'img_url' => DOKAN_PLUGIN_ASSEST . '/images/store-growth-logo.png', + 'img_url' => DOKAN_PLUGIN_ASSET . '/images/store-growth-logo.png',
943-953
: Update the @SInCE tag with the correct version.The
@since
tag is using a placeholderDOKAN_SINCE
. Please replace it with the actual version number.- * @since DOKAN_SINCE + * @since 3.9.3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
includes/Admin/SetupWizard.php
(5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: e2e tests (3, 3)
- GitHub Check: e2e tests (2, 3)
- GitHub Check: e2e tests (1, 3)
- GitHub Check: api tests (1, 1)
🔇 Additional comments (4)
includes/Admin/SetupWizard.php (4)
738-754
: LGTM! Plugin order change looks good.The WooCommerce Conversion Tracking plugin has been correctly repositioned after the StoreGrowth plugin while maintaining code structure and readability.
761-761
: LGTM! Improved plugin description.The updated description better communicates Texty's compatibility with Dokan.
795-810
: LGTM! StoreGrowth installation handling is well-implemented.The installation logic follows security best practices with proper sanitization and maintains consistency with other plugin installations.
924-927
: LGTM! Visibility logic correctly updated.The StoreGrowth plugin check has been properly integrated into the recommended step visibility logic.
includes/Admin/SetupWizard.php
Outdated
@@ -699,18 +699,18 @@ public function dokan_setup_recommended() { | |||
<ul class="recommended-step"> | |||
<?php | |||
if ( $this->user_can_install_plugin() ) { | |||
if ( ! $this->is_wc_conversion_tracking_active() ) { | |||
if ( ! $this->is_store_growth_active() ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Pls create separate class
RecommendedPlugins
and theget
&is_active( string $plugin_basename )
method will return the recommended plugins. - Add new key 'basename' to the plugins and return the the recommended plugins by filtering with is active.
class RecommendedPlugins {
protected array $plugins = [
[
'type' => 'wc_conversion_tracking',
'title' => __( 'WooCommerce Conversion Tracking', 'dokan-lite' ),
'description' => __( 'Track conversions on your WooCommerce store like a pro!', 'dokan-lite' ),
'img_url' => DOKAN_PLUGIN_ASSEST . '/images/wc-conversion-tracking-logo.png',
'img_alt' => __( 'WooCommerce Conversion Tracking logo', 'dokan-lite' ),
'type' => 'store_growth',
'title' => __( 'StoreGrowth', 'dokan-lite' ),
'description' => __( 'Best WooCommerce Marketing Solution!', 'dokan-lite' ),
'img_url' => DOKAN_PLUGIN_ASSEST . '/images/store-growth-logo.png',
'img_alt' => __( 'StoreGrowth logo', 'dokan-lite' ),
'plugins' => [
[
'name' => __( 'WooCommerce Conversion Tracking', 'dokan-lite' ),
'basename' => 'storegrowth-sales-booster/storegrowth-sales-booster.php',
'slug' => 'woocommerce-conversion-tracking',
'name' => __( 'StoreGrowth', 'dokan-lite' ),
'slug' => 'storegrowth-sales-booster',
],
],
]
];
/**
* Get all enlisted plugins with optional filters.
*/
protected function get_enlisted_plugins(): array {
return apply_filters( 'dokan_recommends_plugins', $this->plugins );
}
/**
* Check if a plugin is active.
*/
protected function is_active( string $basename ): bool {
return apply_filters( 'dokan_recommended_plugin_is_active', is_plugin_active( $basename ), $basename );
}
/**
* Get the list of recommended plugins that are not active.
*/
public function get(): array {
$enlisted_plugins = $this->get_enlisted_plugins();
$recommended_plugins = array_filter(
$enlisted_plugins,
function ( $plugin ) {
return isset( $plugin['basename'] ) && !$this->is_active( $plugin['basename'] );
}
);
return apply_filters( 'dokan_recommended_plugins', $recommended_plugins );
}
}
BIG NOTE: DO NOT MERGE - UNLESS PM CLEARANCE |
…d with separate RecommendedPlugins class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (2)
includes/Admin/RecommendedPlugins.php (1)
8-8
: Update version placeholder in PHPDoc.The
@since DOKAN_SINCE
placeholder needs to be replaced with the actual version number.includes/Admin/SetupWizard.php (1)
864-864
: Update version placeholder in PHPDoc.The
@since DOKAN_SINCE
placeholder needs to be replaced with the actual version number.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
includes/Admin/RecommendedPlugins.php
(1 hunks)includes/Admin/SetupWizard.php
(3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: e2e tests (3, 3)
- GitHub Check: e2e tests (2, 3)
- GitHub Check: e2e tests (1, 3)
- GitHub Check: api tests (1, 1)
🔇 Additional comments (4)
includes/Admin/RecommendedPlugins.php (1)
25-82
: LGTM! Well-structured plugins array with clear organization.The plugins array is well-organized with consistent structure across all plugins. Each plugin entry includes all required fields: type, title, description, img_url, img_alt, and plugins array with name, slug, and basename.
includes/Admin/SetupWizard.php (3)
702-705
: LGTM! Clean integration of RecommendedPlugins class.The code effectively utilizes the new RecommendedPlugins class to manage and display recommended plugins.
729-743
: LGTM! Proper implementation of StoreGrowth plugin installation.The code correctly handles the StoreGrowth plugin installation when selected by the user.
702-705
: Verify all references to recommended plugins are updated.Let's ensure there are no remaining direct references to recommended plugins that should be using the new RecommendedPlugins class.
✅ Verification successful
Recommended plugins implementation is properly refactored
The new RecommendedPlugins class is correctly integrated and all references to recommended plugins are properly updated. The changes represent a clean refactoring that centralizes plugin definitions while maintaining the original functionality.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for direct references to recommended plugins that might need updating # Look for references to recommended plugins rg -l "store_growth|wc_conversion_tracking|wemail|texty" --type php # Look for potential plugin installation references rg -l "install_plugin.*store.*growth" --type phpLength of output: 189
Script:
#!/bin/bash # Inspect the implementation details of both files echo "=== SetupWizard.php content ===" rg -A 5 -B 5 "RecommendedPlugins|store_growth|wc_conversion_tracking|wemail|texty" includes/Admin/SetupWizard.php echo -e "\n=== RecommendedPlugins.php content ===" cat includes/Admin/RecommendedPlugins.php # Look for any other plugin-related patterns echo -e "\n=== Other plugin references ===" rg -l "recommended.*plugin|plugin.*recommend" --type phpLength of output: 8863
} | ||
); | ||
|
||
error_log( print_r( $recommended_plugins, 1 ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Remove debug error_log statement.
Production code should not contain debug logging statements.
- error_log( print_r( $recommended_plugins, 1 ) );
…ge already installed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
includes/Admin/SetupWizard.php (2)
874-884
: Update the version placeholder in PHPDoc.The
@since DOKAN_SINCE
tag contains a placeholder that should be replaced with the actual version number.- * @since DOKAN_SINCE + * @since 3.9.0
738-753
: Add error handling for plugin installation.The plugin installation logic should handle potential errors that might occur during the installation process.
Consider adding error handling:
if ( $setup_store_growth && ! $this->is_store_growth_active() ) { + try { $this->install_plugin( 'storegrowth-sales-booster', [ 'name' => __( 'StoreGrowth', 'dokan-lite' ), 'repo-slug' => 'storegrowth-sales-booster', 'file' => 'storegrowth-sales-booster.php', ] ); + } catch ( Exception $e ) { + dokan_log( sprintf( 'StoreGrowth plugin installation failed: %s', $e->getMessage() ) ); + // Optionally, add admin notice about the failure + add_action( 'admin_notices', function() { + echo '<div class="notice notice-error"><p>' . esc_html__( 'Failed to install StoreGrowth plugin. Please try installing it manually.', 'dokan-lite' ) . '</p></div>'; + } ); + } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
includes/Admin/SetupWizard.php
(5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: e2e tests (3, 3)
- GitHub Check: e2e tests (2, 3)
- GitHub Check: e2e tests (1, 3)
- GitHub Check: api tests (1, 1)
🔇 Additional comments (2)
includes/Admin/SetupWizard.php (2)
29-36
: LGTM! Well-structured property declaration and initialization.The new
RecommendedPlugins
property is properly typed, well-documented, and correctly initialized in the constructor.Also applies to: 47-47
713-714
: Implementation aligns with previous review suggestions.The code now properly utilizes the
RecommendedPlugins
class for managing plugin recommendations, as suggested in the previous review.Also applies to: 867-867
includes/Admin/SetupWizard.php
Outdated
$setup_store_growth = isset( $_POST['setup_store_growth'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_store_growth'] ) ); | ||
$setup_wc_conversion_tracking = isset( $_POST['setup_wc_conversion_tracking'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_wc_conversion_tracking'] ) ); | ||
$setup_wemail = isset( $_POST['setup_wemail'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_wemail'] ) ); | ||
$setup_texty = isset( $_POST['setup_texty'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_texty'] ) ); | ||
|
||
if ( $setup_store_growth && ! $this->is_store_growth_active() ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Pls also refactor this section so that we can handle it dynamically.
- Check the
current_user_can( 'manage_woocommerce' )
before the install.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
includes/Admin/SetupWizard.php (1)
940-942
: Enhance error handling for unauthorized access.Consider adding proper error handling when the user lacks required capabilities.
Apply this diff to improve the code:
if ( ! current_user_can( 'manage_woocommerce' ) ) { + wp_die( + esc_html__( 'You do not have sufficient permissions to install plugins.', 'dokan-lite' ), + esc_html__( 'Permission Error', 'dokan-lite' ), + [ 'response' => 403 ] + ); return; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
includes/Admin/SetupWizard.php
(7 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: e2e tests (3, 3)
- GitHub Check: e2e tests (2, 3)
- GitHub Check: e2e tests (1, 3)
- GitHub Check: api tests (1, 1)
🔇 Additional comments (3)
includes/Admin/SetupWizard.php (3)
29-36
: LGTM! Well-documented property declaration.The property is well-documented with proper PHPDoc and appropriate visibility modifier.
47-47
: LGTM! Proper initialization with capability check.The RecommendedPlugins instance is correctly initialized after verifying user capabilities.
713-714
: LGTM! Improved plugin recommendation handling.The code now uses a centralized approach for managing recommended plugins, making it more maintainable.
/** | ||
* Determines if a plugin should be installed based on POST data. | ||
* | ||
* @since DOKAN_SINCE | ||
* | ||
* @param array $plugin Plugin configuration array | ||
* | ||
* @return bool | ||
*/ | ||
private function should_install_plugin( array $plugin ): bool { | ||
check_admin_referer( 'dokan-setup' ); | ||
|
||
$setup_key = 'setup_' . $plugin['type']; | ||
|
||
if ( ! isset( $_POST[ $setup_key ] ) ) { | ||
return false; | ||
} | ||
|
||
return 'yes' === sanitize_text_field( wp_unslash( $_POST[ $setup_key ] ) ); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Improve security and validation in should_install_plugin method.
Consider these improvements:
- Move nonce verification to the caller (dokan_setup_recommended_save)
- Add validation for the plugin array structure
Apply this diff to improve the code:
private function should_install_plugin( array $plugin ): bool {
- check_admin_referer( 'dokan-setup' );
+ if ( ! isset( $plugin['type'] ) || empty( $plugin['type'] ) ) {
+ return false;
+ }
$setup_key = 'setup_' . $plugin['type'];
if ( ! isset( $_POST[ $setup_key ] ) ) {
return false;
}
return 'yes' === sanitize_text_field( wp_unslash( $_POST[ $setup_key ] ) );
}
And in dokan_setup_recommended_save method:
public function dokan_setup_recommended_save() {
+ check_admin_referer( 'dokan-setup' );
+
foreach ( $this->recommended_plugins->get() as $plugin ) {
Committable suggestion skipped: line range outside the PR's diff.
foreach ( $this->recommended_plugins->get() as $plugin ) { | ||
if ( ! $this->should_install_plugin( $plugin ) ) { | ||
continue; | ||
} | ||
|
||
$setup_wc_conversion_tracking = isset( $_POST['setup_wc_conversion_tracking'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_wc_conversion_tracking'] ) ); | ||
$setup_wemail = isset( $_POST['setup_wemail'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_wemail'] ) ); | ||
$setup_texty = isset( $_POST['setup_texty'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_texty'] ) ); | ||
$plugin_details = $plugin['plugins'][0] ?? null; | ||
|
||
if ( $setup_wc_conversion_tracking && ! $this->is_wc_conversion_tracking_active() ) { | ||
$this->install_plugin( | ||
'woocommerce-conversion-tracking', | ||
[ | ||
'name' => __( 'WooCommerce Conversion Tracking', 'dokan-lite' ), | ||
'repo-slug' => 'woocommerce-conversion-tracking', | ||
'file' => 'conversion-tracking.php', | ||
] | ||
); | ||
} | ||
if ( ! $plugin_details ) { | ||
continue; | ||
} | ||
|
||
if ( $setup_wemail && ! $this->is_wemail_active() ) { | ||
$this->install_plugin( | ||
'wemail', | ||
[ | ||
'name' => __( 'weMail', 'dokan-lite' ), | ||
'repo-slug' => 'wemail', | ||
'file' => 'wemail.php', | ||
] | ||
); | ||
} | ||
$plugin_details_arr = explode( '/', $plugin_details['basename'] ?? '' ); | ||
|
||
if ( $setup_texty && ! $this->is_texty_active() ) { | ||
$this->install_plugin( | ||
'texty', | ||
$plugin_details['slug'], | ||
[ | ||
'name' => __( 'Texty', 'dokan-lite' ), | ||
'repo-slug' => 'texty', | ||
'file' => 'texty.php', | ||
'name' => $plugin_details['name'] ?? '', | ||
'repo-slug' => $plugin_details_arr[0] ?? '', | ||
'file' => $plugin_details_arr[1] ?? '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Enhance array access safety and consistency.
Consider these improvements for safer array handling:
- Use null coalescing operator consistently
- Add validation for plugin details array structure
- Use array_key_exists for safer checks
Apply this diff to improve the code:
foreach ( $this->recommended_plugins->get() as $plugin ) {
if ( ! $this->should_install_plugin( $plugin ) ) {
continue;
}
- $plugin_details = $plugin['plugins'][0] ?? null;
+ if ( ! isset( $plugin['plugins'] ) || ! is_array( $plugin['plugins'] ) || empty( $plugin['plugins'] ) ) {
+ continue;
+ }
+
+ $plugin_details = $plugin['plugins'][0];
if ( ! $plugin_details ) {
continue;
}
- $plugin_details_arr = explode( '/', $plugin_details['basename'] ?? '' );
+ $basename = $plugin_details['basename'] ?? '';
+ if ( empty( $basename ) ) {
+ continue;
+ }
+
+ $plugin_details_arr = explode( '/', $basename );
$this->install_plugin(
$plugin_details['slug'],
[
- 'name' => $plugin_details['name'] ?? '',
- 'repo-slug' => $plugin_details_arr[0] ?? '',
- 'file' => $plugin_details_arr[1] ?? '',
+ 'name' => $plugin_details['name'] ?? 'Unknown Plugin',
+ 'repo-slug' => $plugin_details_arr[0] ?? $plugin_details['slug'],
+ 'file' => $plugin_details_arr[1] ?? $plugin_details['slug'] . '.php',
]
);
}
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
foreach ( $this->recommended_plugins->get() as $plugin ) { | |
if ( ! $this->should_install_plugin( $plugin ) ) { | |
continue; | |
} | |
$setup_wc_conversion_tracking = isset( $_POST['setup_wc_conversion_tracking'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_wc_conversion_tracking'] ) ); | |
$setup_wemail = isset( $_POST['setup_wemail'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_wemail'] ) ); | |
$setup_texty = isset( $_POST['setup_texty'] ) && 'yes' === sanitize_text_field( wp_unslash( $_POST['setup_texty'] ) ); | |
$plugin_details = $plugin['plugins'][0] ?? null; | |
if ( $setup_wc_conversion_tracking && ! $this->is_wc_conversion_tracking_active() ) { | |
$this->install_plugin( | |
'woocommerce-conversion-tracking', | |
[ | |
'name' => __( 'WooCommerce Conversion Tracking', 'dokan-lite' ), | |
'repo-slug' => 'woocommerce-conversion-tracking', | |
'file' => 'conversion-tracking.php', | |
] | |
); | |
} | |
if ( ! $plugin_details ) { | |
continue; | |
} | |
if ( $setup_wemail && ! $this->is_wemail_active() ) { | |
$this->install_plugin( | |
'wemail', | |
[ | |
'name' => __( 'weMail', 'dokan-lite' ), | |
'repo-slug' => 'wemail', | |
'file' => 'wemail.php', | |
] | |
); | |
} | |
$plugin_details_arr = explode( '/', $plugin_details['basename'] ?? '' ); | |
if ( $setup_texty && ! $this->is_texty_active() ) { | |
$this->install_plugin( | |
'texty', | |
$plugin_details['slug'], | |
[ | |
'name' => __( 'Texty', 'dokan-lite' ), | |
'repo-slug' => 'texty', | |
'file' => 'texty.php', | |
'name' => $plugin_details['name'] ?? '', | |
'repo-slug' => $plugin_details_arr[0] ?? '', | |
'file' => $plugin_details_arr[1] ?? '', | |
foreach ( $this->recommended_plugins->get() as $plugin ) { | |
if ( ! $this->should_install_plugin( $plugin ) ) { | |
continue; | |
} | |
if ( ! isset( $plugin['plugins'] ) || ! is_array( $plugin['plugins'] ) || empty( $plugin['plugins'] ) ) { | |
continue; | |
} | |
$plugin_details = $plugin['plugins'][0]; | |
if ( ! $plugin_details ) { | |
continue; | |
} | |
$basename = $plugin_details['basename'] ?? ''; | |
if ( empty( $basename ) ) { | |
continue; | |
} | |
$plugin_details_arr = explode( '/', $basename ); | |
$this->install_plugin( | |
$plugin_details['slug'], | |
[ | |
'name' => $plugin_details['name'] ?? 'Unknown Plugin', | |
'repo-slug' => $plugin_details_arr[0] ?? $plugin_details['slug'], | |
'file' => $plugin_details_arr[1] ?? $plugin_details['slug'] . '.php', | |
] | |
); |
All Submissions:
Changes proposed in this Pull Request:
Related Pull Request(s)
Closes
How to test the changes in this Pull Request:
Changelog entry
enhance: StoreGrowth listed to the admin setup wizard recommendation plugins
Detailed Description of the pull request. What was previous behaviour
and what will be changed in this PR.
Before Changes
Describe the issue before changes with screenshots(s).
After Changes
Describe the issue after changes with screenshot(s).
Feature Video (optional)
Link of detailed video if this PR is for a feature.
PR Self Review Checklist:
FOR PR REVIEWER ONLY:
Summary by CodeRabbit
New Features
Bug Fixes