Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
Marketing::has_installed_extensions()
Check if the store has installed marketing extensions.
Method of the class: Marketing{}
No Hooks.
Return
true|false
.
Usage
$result = Marketing::has_installed_extensions();
Marketing::has_installed_extensions() Marketing::has installed extensions code WC 8.7.0
public static function has_installed_extensions() { $plugins = self::get_plugins(); $remaining = array(); $installed = array(); foreach ( $plugins as $plugin ) { if ( ! $plugin->is_installed ) { $remaining[] = $plugin; } else { $installed[] = $plugin; } } // Make sure the task has been actioned and a marketing extension has been installed. if ( count( $installed ) > 0 && Task::is_task_actioned( 'marketing' ) ) { return true; } return false; }