Automattic\WooCommerce\Internal\Admin\ProductForm

FormFactory::add_section()public staticWC 1.0

Adds a section to the product form.

Method of the class: FormFactory{}

No Hooks.

Return

Section|WP_Error. New section or WP_Error.

Usage

$result = FormFactory::add_section( $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_section() code WC 9.0.1

public static function add_section( $id, $plugin_id, $args ) {
	$new_section = self::create_item( 'section', 'Section', $id, $plugin_id, $args );
	if ( is_wp_error( $new_section ) ) {
		return $new_section;
	}
	self::$form_sections[ $id ] = $new_section;
	return $new_section;
}