WooCommerce Code Reference

WC_Admin_Assets
in package

WC_Admin_Assets Class.

Table of Contents

__construct()  : mixed
Hook in tabs.
admin_scripts()  : mixed
Enqueue scripts.
admin_styles()  : mixed
Enqueue styles.
enqueue_block_editor_assets()  : void
Enqueue block editor assets.
enqueue_block_editor_script()  : void
Enqueue a script in the block editor.
is_order_meta_box_screen()  : bool
Helper function to determine whether the current screen is an order edit screen.

Methods

enqueue_block_editor_script()

Enqueue a script in the block editor.

private enqueue_block_editor_script(mixed $script_path_name, mixed $script_name) : void

Similar to WCAdminAssets::register_script() but without enqueuing unnecessary dependencies.

Parameters
$script_path_name : mixed
$script_name : mixed
Return values
void

is_order_meta_box_screen()

Helper function to determine whether the current screen is an order edit screen.

private is_order_meta_box_screen(string $screen_id) : bool
Parameters
$screen_id : string

Screen ID.

Return values
boolWhether the current screen is an order edit screen.