Automattic\WooCommerce\Admin
PluginsHelper::maybe_enqueue_scripts_for_connect_notice
Enqueue scripts for connect notice in WooCommerce settings page.
Method of the class: PluginsHelper{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = PluginsHelper::maybe_enqueue_scripts_for_connect_notice();
PluginsHelper::maybe_enqueue_scripts_for_connect_notice() PluginsHelper::maybe enqueue scripts for connect notice code WC 10.7.0
public static function maybe_enqueue_scripts_for_connect_notice() {
if ( 'woocommerce_page_wc-settings' !== get_current_screen()->id ) {
return;
}
$notice_type = WC_Helper_Updater::get_woo_connect_notice_type();
if ( 'none' === $notice_type ) {
return;
}
WCAdminAssets::register_script( 'wp-admin-scripts', 'woo-connect-notice' );
wp_enqueue_script( 'woo-connect-notice' );
}