Automattic\WooCommerce\Internal\Admin

WcPayWelcomePage::allowed_promo_notes()publicWC 1.0

Adds allowed promo notes from the WooPayments incentive.

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

Хуков нет.

Возвращает

Массив.

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

$WcPayWelcomePage = new WcPayWelcomePage();
$WcPayWelcomePage->allowed_promo_notes( $promo_notes ): array;
$promo_notes(массив)
Allowed promo notes.
По умолчанию: []

Код WcPayWelcomePage::allowed_promo_notes() WC 8.1.1

public function allowed_promo_notes( $promo_notes = [] ): array {
	// Return early if the incentive must not be visible.
	if ( ! $this->must_be_visible() ) {
		return $promo_notes;
	}

	// Add our incentive ID to the promo notes.
	$promo_notes[] = $this->get_incentive()['id'];

	return $promo_notes;
}