WooCommerce Code Reference

Loader extends DeprecatedClassFacade
in package

Loader Class.

Tags
deprecated

since 6.3.0, use WooCommerce\Internal\Admin\Loader.

Table of Contents

$deprecated_in_version  : string
The version that this class was deprecated in.
$facade_over_classname  : string
The name of the non-deprecated class that this facade covers.
$instance  : object
The instance that this facade covers over.
$logged_messages  : array<string|int, mixed>
Static array of logged messages.
__call()  : mixed
Executes when calling any function on an instance of this class.
__callStatic()  : mixed
Executes when calling any static function on this class.
__construct()  : mixed
Constructor.
is_admin_or_embed_page()  : mixed
Returns true if we are on a JS powered admin page or a "classic" (non JS app) powered admin page (an embedded page).
is_admin_page()  : mixed
Returns true if we are on a JS powered admin page.
is_embed_page()  : mixed
Returns true if we are on a "classic" (non JS app) powered admin page.
is_feature_enabled()  : bool
Returns if a specific wc-admin feature is enabled.
should_use_minified_js_file()  : bool
Determines if a minified JS file should be served.
log_deprecation()  : mixed
Log a deprecation to the error log.

Properties

$deprecated_in_version

The version that this class was deprecated in.

protected static string $deprecated_in_version = '6.3.0'

$facade_over_classname

The name of the non-deprecated class that this facade covers.

protected static string $facade_over_classname = 'Automattic\WooCommerce\Internal\Admin\Loader'

Methods

__call()

Executes when calling any function on an instance of this class.

public __call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string

The name of the function being called.

$arguments : array<string|int, mixed>

An array of the arguments to the function call.

Return values
mixed

__callStatic()

Executes when calling any static function on this class.

public static __callStatic(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string

The name of the function being called.

$arguments : array<string|int, mixed>

An array of the arguments to the function call.

Return values
mixed

is_admin_or_embed_page()

Returns true if we are on a JS powered admin page or a "classic" (non JS app) powered admin page (an embedded page).

public static is_admin_or_embed_page() : mixed
Tags
deprecated
6.3.0
Return values
mixed

is_admin_page()

Returns true if we are on a JS powered admin page.

public static is_admin_page() : mixed
Tags
deprecated
6.3.0
Return values
mixed

is_embed_page()

Returns true if we are on a "classic" (non JS app) powered admin page.

public static is_embed_page() : mixed
Tags
deprecated
6.3.0
Return values
mixed

is_feature_enabled()

Returns if a specific wc-admin feature is enabled.

public static is_feature_enabled(string $feature) : bool
Parameters
$feature : string

Feature slug.

Tags
deprecated

since 5.0.0, use Features::is_enabled( $feature )

Return values
boolReturns true if the feature is enabled.

should_use_minified_js_file()

Determines if a minified JS file should be served.

public static should_use_minified_js_file(bool $script_debug) : bool
Parameters
$script_debug : bool

Only serve unminified files if script debug is on.

Tags
deprecated

since 6.3.0, use WCAdminAssets::should_use_minified_js_file( $script_debug )

Return values
boolIf js asset should use minified version.

log_deprecation()

Log a deprecation to the error log.

private static log_deprecation(string $function) : mixed
Parameters
$function : string

The name of the deprecated function being called.

Return values
mixed