Automattic\WooCommerce\Internal\Admin
Marketplace::enqueue_scripts
Enqueue update script.
Method of the class: Marketplace{}
No Hooks.
Returns
null. Nothing (null).
Usage
$Marketplace = new Marketplace(); $Marketplace->enqueue_scripts( $hook_suffix );
- $hook_suffix(string) (required)
- The current admin page.
Marketplace::enqueue_scripts() Marketplace::enqueue scripts code WC 10.3.3
public function enqueue_scripts( $hook_suffix ) {
// phpcs:disable WordPress.Security.NonceVerification.Recommended
if ( 'woocommerce_page_wc-admin' !== $hook_suffix ) {
return;
}
if ( ! isset( $_GET['path'] ) || '/extensions' !== $_GET['path'] ) {
return;
}
// Enqueue WordPress updates script to enable plugin and theme installs and updates.
wp_enqueue_script( 'updates' );
// phpcs:enable WordPress.Security.NonceVerification.Recommended
}