Automattic\WooCommerce\Internal\Admin\ProductForm
FormFactory::add_tab()
Adds a tab to the product form.
Method of the class: FormFactory{}
No Hooks.
Return
Tab|WP_Error
. New section or WP_Error.
Usage
$result = FormFactory::add_tab( $id, $plugin_id, $args );
- $id(string) (required)
- Card id.
- $plugin_id(string) (required)
- Plugin id.
- $args(array) (required)
- Array containing the necessary arguments.
FormFactory::add_tab() FormFactory::add tab code WC 9.7.1
public static function add_tab( $id, $plugin_id, $args ) { $new_tab = self::create_item( 'tab', 'Tab', $id, $plugin_id, $args ); if ( is_wp_error( $new_tab ) ) { return $new_tab; } self::$form_tabs[ $id ] = $new_tab; return $new_tab; }