WooCommerce Code Reference

WC_Admin_Meta_Boxes

WC_Admin_Meta_Boxes.

Table of Contents

$meta_box_errors  : array<string|int, mixed>
Meta box error messages.
$saved_meta_boxes  : bool
Is meta boxes saved once?
__construct()  : mixed
Constructor.
add_error()  : mixed
Add an error message.
add_meta_boxes()  : mixed
Add WC Meta boxes.
output_errors()  : mixed
Show any stored error messages.
remove_block_templates()  : array<string|int, string>
Remove block-based templates from the list of available templates for products.
remove_meta_boxes()  : mixed
Remove bloat.
rename_meta_boxes()  : mixed
Rename core meta boxes.
save_errors()  : mixed
Save errors to an option.
save_meta_boxes()  : mixed
Check if we're saving, the trigger an action based on the post type.

Properties

Methods

remove_block_templates()

Remove block-based templates from the list of available templates for products.

public remove_block_templates(array<string|int, string> $templates) : array<string|int, string>
Parameters
$templates : array<string|int, string>

Array of template header names keyed by the template file name.

Return values
array<string|int, string>Templates array excluding block-based templates.

save_meta_boxes()

Check if we're saving, the trigger an action based on the post type.

public save_meta_boxes(int $post_id, object $post) : mixed
Parameters
$post_id : int

Post ID.

$post : object

Post object.

Return values
mixed