Automattic\WooCommerce\Internal\Admin\ProductForm

FormFactory::add_subsection()public staticWC 1.0

Adds a Subsection to the product form.

Method of the class: FormFactory{}

No Hooks.

Return

Subsection|WP_Error. New subsection or WP_Error.

Usage

$result = FormFactory::add_subsection( $id, $plugin_id, $args );
$id(string) (required)
Subsection id.
$plugin_id(string) (required)
Plugin id.
$args(array)
Array containing the necessary arguments.
Default: array()

FormFactory::add_subsection() code WC 9.3.1

public static function add_subsection( $id, $plugin_id, $args = array() ) {
	$new_subsection = self::create_item( 'subsection', 'Subsection', $id, $plugin_id, $args );
	if ( is_wp_error( $new_subsection ) ) {
		return $new_subsection;
	}
	self::$form_subsections[ $id ] = $new_subsection;
	return $new_subsection;
}