Automattic\WooCommerce\Internal\Admin\Notes
PaymentsRemindMeLater::should_display_note
Returns true if we should display the note.
Method of the class: PaymentsRemindMeLater{}
No Hooks.
Returns
true|false.
Usage
$result = PaymentsRemindMeLater::should_display_note();
PaymentsRemindMeLater::should_display_note() PaymentsRemindMeLater::should display note code WC 10.6.2
public static function should_display_note() {
// A WooPayments incentive must be visible.
if ( ! WcPayWelcomePage::instance()->has_incentive() ) {
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;
}