Automattic\WooCommerce\Internal\Admin
Marketplace::on_init()
Hook into WordPress on init.
Method of the class: Marketplace{}
No Hooks.
Return
null
. Nothing (null).
Usage
$Marketplace = new Marketplace(); $Marketplace->on_init();
Marketplace::on_init() Marketplace::on init code WC 9.3.3
public function on_init() { if ( false === FeaturesUtil::feature_is_enabled( 'marketplace' ) ) { /** Feature controller instance @var FeaturesController $feature_controller */ $feature_controller = wc_get_container()->get( FeaturesController::class ); $feature_controller->change_feature_enable( 'marketplace', true ); } add_action( 'admin_menu', array( $this, 'register_pages' ), 70 ); add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); // Add a Woo Marketplace link to the plugin install action links. add_filter( 'install_plugins_tabs', array( $this, 'add_woo_plugin_install_action_link' ) ); add_action( 'install_plugins_pre_woo', array( $this, 'maybe_open_woo_tab' ) ); add_action( 'admin_print_styles-plugin-install.php', array( $this, 'add_plugins_page_styles' ) ); }