Automattic\WooCommerce\Internal\Admin\Notes

PaymentsRemindMeLater::should_display_note()public staticWC 1.0

Returns true if we should display the note.

Method of the class: PaymentsRemindMeLater{}

No Hooks.

Return

true|false.

Usage

$result = PaymentsRemindMeLater::should_display_note();

PaymentsRemindMeLater::should_display_note() code WC 8.9.0

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

	// Less than 3 days since viewing welcome page.
	$view_timestamp = get_option( 'wcpay_welcome_page_viewed_timestamp', false );
	if ( ! $view_timestamp ||
		( time() - $view_timestamp < 3 * DAY_IN_SECONDS )
	) {
		return false;
	}
	return true;
}