Automattic\WooCommerce\Internal\Admin\ProductForm

Section::__construct()publicWC 1.0

Constructor

Метод класса: Section{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$Section = new Section();
$Section->__construct( $id, $plugin_id, $additional_args );
$id(строка) (обязательный)
Section id.
$plugin_id(строка) (обязательный)
Plugin id.
$additional_args(массив) (обязательный)
Array containing additional arguments.
php $args = array( 'order' => (int) Section order. 'title' => (string) Section description. 'description' => (string) Section description. ).

Код Section::__construct() WC 8.7.0

public function __construct( $id, $plugin_id, $additional_args ) {
	parent::__construct( $id, $plugin_id, $additional_args );
	$this->required_arguments = array(
		'title',
	);
	$missing_arguments        = self::get_missing_arguments( $additional_args );
	if ( count( $missing_arguments ) > 0 ) {
		throw new \Exception(
			sprintf(
			/* translators: 1: Missing arguments list. */
				esc_html__( 'You are missing required arguments of WooCommerce ProductForm Section: %1$s', 'woocommerce' ),
				join( ', ', $missing_arguments )
			)
		);
	}
}