Automattic\WooCommerce\Internal\Admin\Notes
PaymentsMoreInfoNeeded::should_display_note()
Returns true if we should display the note.
Method of the class: PaymentsMoreInfoNeeded{}
No Hooks.
Return
true|false
.
Usage
$result = PaymentsMoreInfoNeeded::should_display_note();
PaymentsMoreInfoNeeded::should_display_note() PaymentsMoreInfoNeeded::should display note code WC 7.7.0
public static function should_display_note() { // If user has installed WCPay, don't show this note. $installed_plugins = PluginsHelper::get_installed_plugin_slugs(); if ( in_array( 'woocommerce-payments', $installed_plugins, true ) ) { return false; } // User has dismissed the WCPay Welcome Page. if ( 'yes' !== get_option( 'wc_calypso_bridge_payments_dismissed', 'no' ) ) { return false; } // More than 30 days since viewing the welcome page. $exit_survey_timestamp = get_option( 'wc_pay_exit_survey_more_info_needed_timestamp', false ); if ( ! $exit_survey_timestamp || ( time() - $exit_survey_timestamp < 30 * DAY_IN_SECONDS ) ) { return false; } return true; }