WooCommerce Code Reference

WC_Meta_Box_Product_Data

WC_Meta_Box_Product_Data Class.

Table of Contents

output()  : mixed
Output the metabox.
output_variations()  : mixed
Show options for the variable product type.
prepare_attributes()  : array
Prepare attributes for save.
save()  : mixed
Save meta box data.
save_variations()  : mixed
Save variation meta box data.
filter_variation_attributes()  : bool
Filter callback for finding variation attributes.
get_product_data_tabs()  : array
Return array of tabs to show.
get_product_type_options()  : array
Return array of product type options.
output_tabs()  : mixed
Show tab content/settings.
prepare_children()  : array
Prepare children for save.
prepare_downloads()  : array
Prepare downloads for save.
prepare_set_attributes()  : array
Prepare attributes for a specific variation or defaults.
product_data_tabs_sort()  : bool
Callback to sort product data tabs on priority.

Methods

prepare_downloads()

Prepare downloads for save.

private static prepare_downloads(array $file_names, array $file_urls, array $file_hashes) : array
Parameters
$file_names : array

File names.

$file_urls : array

File urls.

$file_hashes : array

File hashes.

Return values
array

prepare_set_attributes()

Prepare attributes for a specific variation or defaults.

private static prepare_set_attributes(array $all_attributes[, string $key_prefix = 'attribute_' ][, int $index = null ]) : array
Parameters
$all_attributes : array

List of attribute keys.

$key_prefix : string = 'attribute_'

Attribute key prefix.

$index : int = null

Attribute array index.

Return values
array