Automattic\WooCommerce\Admin\Features\OnboardingTasks

TaskList::maybe_set_default_layout()publicWC 1.0

Sets the default homepage layout to two_columns if "setup" tasklist is completed or hidden.

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

No Hooks.

Return

null. Nothing.

Usage

$TaskList = new TaskList();
$TaskList->maybe_set_default_layout( $completed_or_hidden_tasklist_ids );
$completed_or_hidden_tasklist_ids(array) (required)
Array of tasklist ids.

Код TaskList::maybe_set_default_layout() WC 7.1.0

public function maybe_set_default_layout( $completed_or_hidden_tasklist_ids ) {
	if ( in_array( 'setup', $completed_or_hidden_tasklist_ids, true ) ) {
		update_option( 'woocommerce_default_homepage_layout', 'two_columns' );
	}
}