WooCommerce Code Reference

WC_Admin
in package

WC_Admin class.

Table of Contents

__construct()  : mixed
Constructor.
admin_footer_text()  : string
Change the admin footer text on WooCommerce admin pages.
admin_redirects()  : mixed
Handle redirects to setup/welcome page after install and updates.
buffer()  : mixed
Output buffering allows admin screens to make redirects later on.
conditional_includes()  : mixed
Include admin files conditionally.
disable_webhook_post_export()  : array<string|int, mixed>
Disable WXR export of scheduled action posts.
include_admin_body_class()  : string
Include admin classes.
includes()  : mixed
Include any classes we need within admin.
prevent_admin_access()  : mixed
Prevent any user who cannot 'edit_posts' (subscribers, customers etc) from accessing admin.
preview_emails()  : mixed
Preview email template.
setup_wizard_check_jetpack()  : mixed
Check on a Jetpack install queued by the Setup Wizard.

Methods

Change the admin footer text on WooCommerce admin pages.

public admin_footer_text(string $footer_text) : string
Parameters
$footer_text : string

text to be rendered in the footer.

Tags
since
2.3
Return values
string

admin_redirects()

Handle redirects to setup/welcome page after install and updates.

public admin_redirects() : mixed

The user must have access rights, and we must ignore the network/bulk plugin updaters.

Return values
mixed

disable_webhook_post_export()

Disable WXR export of scheduled action posts.

public disable_webhook_post_export(array<string|int, mixed> $args) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>

Scheduled action post type registration args.

Tags
since
3.6.2
Return values
array<string|int, mixed>

include_admin_body_class()

Include admin classes.

public include_admin_body_class(string $classes) : string
Parameters
$classes : string

Body classes string.

Tags
since
4.2.0
Return values
string

prevent_admin_access()

Prevent any user who cannot 'edit_posts' (subscribers, customers etc) from accessing admin.

public prevent_admin_access() : mixed
Return values
mixed

setup_wizard_check_jetpack()

Check on a Jetpack install queued by the Setup Wizard.

public setup_wizard_check_jetpack() : mixed

See: WC_Admin_Setup_Wizard::install_jetpack()

Return values
mixed