Automattic\WooCommerce\Internal\Admin
WcPayWelcomePage::allowed_promo_notes()
Adds allowed promo notes for the WooPayments incentives.
Метод класса: WcPayWelcomePage{}
Хуков нет.
Возвращает
Массив
.
Использование
$WcPayWelcomePage = new WcPayWelcomePage(); $WcPayWelcomePage->allowed_promo_notes( $promo_notes ): array;
- $promo_notes(массив)
- Allowed promo notes.
По умолчанию: array()
Код WcPayWelcomePage::allowed_promo_notes() WcPayWelcomePage::allowed promo notes WC 9.5.1
public function allowed_promo_notes( $promo_notes = array() ): array { // Note: We need to disregard if WooPayments is active when adding the promo note to the list of // allowed promo notes. The AJAX call that adds the promo note happens after WooPayments is installed and activated. // Return early if the incentive page must not be visible, without checking if WooPayments is active. if ( ! $this->is_incentive_visible( true ) ) { return $promo_notes; } // Add our incentive ID to the allowed promo notes so it can be added to the store. $promo_notes[] = $this->get_incentive()['id']; return $promo_notes; }