Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
Marketing::on_activated_plugin
Mark the task as complete when related plugins are activated.
Method of the class: Marketing{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Marketing = new Marketing(); $Marketing->on_activated_plugin( $plugin );
- $plugin(required)
- .
Marketing::on_activated_plugin() Marketing::on activated plugin code WC 10.7.0
public function on_activated_plugin( $plugin ) {
$plugin_basename = basename( plugin_basename( $plugin ), '.php' );
// Example: How to mark the marketing task as complete when a specific plugin is activated.
/**
* Example:
* if (
* $plugin_basename === 'multichannel-by-cedcommerce' &&
* $this->task_list->visible &&
* ! $this->task_list->is_hidden() &&
* ! $this->is_complete()
* ) {
* $this->mark_actioned();
* }
*/
}