PHP Class WC_Meta_Box_Product_Data

Exibir arquivo Open project: woocommerce/woocommerce Class Usage Examples

Public Methods

Method Description
output ( WP_Post $post ) Output the metabox.
output_variations ( ) Show options for the variable product type.
prepare_attributes ( $data = false ) : array Prepare attributes for save.
save ( $post_id, $post ) Save meta box data.
save_variations ( integer $post_id, WP_Post $post ) Save meta box data.

Private Methods

Method Description
filter_variation_attributes ( WC_Product_Attribute $attribute ) : boolean 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 ( ) Show tab content/settings.
prepare_children ( ) : array Prepare children for save.
prepare_downloads ( $file_names, $file_urls, $file_hashes ) : array Prepare downloads for save.
prepare_set_attributes ( array $all_attributes, string $key_prefix = 'attribute_', integer $index = null ) : array Prepare attributes for a specific variation or defaults.

Method Details

output() public static method

Output the metabox.
public static output ( WP_Post $post )
$post WP_Post

output_variations() public static method

Show options for the variable product type.
public static output_variations ( )

prepare_attributes() public static method

Prepare attributes for save.
public static prepare_attributes ( $data = false ) : array
return array

save() public static method

Save meta box data.
public static save ( $post_id, $post )

save_variations() public static method

Save meta box data.
public static save_variations ( integer $post_id, WP_Post $post )
$post_id integer
$post WP_Post