Automattic\WooCommerce\Internal\Admin\Notes

PaymentsMoreInfoNeeded::should_display_note()public staticWC 1.0

Returns true if we should display the note.

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

Хуков нет.

Возвращает

true|false.

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

$result = PaymentsMoreInfoNeeded::should_display_note();

Код PaymentsMoreInfoNeeded::should_display_note() WC 8.9.3

public static function should_display_note() {
	// WCPay welcome page must not be visible.
	if ( WcPayWelcomePage::instance()->must_be_visible() ) {
		return false;
	}

	// More than 30 days since viewing the welcome page.
	$exit_survey_timestamp = get_option( 'wcpay_welcome_page_exit_survey_more_info_needed_timestamp', false );
	if ( ! $exit_survey_timestamp ||
		( time() - $exit_survey_timestamp < 30 * DAY_IN_SECONDS )
	) {
		return false;
	}

	return true;
}