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
__construct()
Hook in tabs.
public
__construct() : mixed
Return values
mixed —admin_scripts()
Enqueue scripts.
public
admin_scripts() : mixed
Return values
mixed —admin_styles()
Enqueue styles.
public
admin_styles() : mixed
Return values
mixed —enqueue_block_editor_assets()
Enqueue block editor assets.
public
enqueue_block_editor_assets() : void
Return values
void —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.