Server IP : 104.21.14.103 / Your IP : 3.137.216.227 Web Server : LiteSpeed System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : giankuin ( 1871) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/thread-self/root/proc/thread-self/root/home/giankuin/khowordpress.com/wp-content/plugins/woocommerce/src/Internal/Admin/Notes/ |
Upload File : |
<?php /** * WooCommerce Admin Payments More Info Needed Inbox Note Provider */ namespace Automattic\WooCommerce\Internal\Admin\Notes; use Automattic\WooCommerce\Admin\Notes\Note; use Automattic\WooCommerce\Admin\Notes\NoteTraits; use Automattic\WooCommerce\Internal\Admin\WcPayWelcomePage; defined( 'ABSPATH' ) || exit; /** * PaymentsMoreInfoNeeded */ class PaymentsMoreInfoNeeded { /** * Note traits. */ use NoteTraits; /** * Name of the note for use in the database. */ const NOTE_NAME = 'wc-admin-payments-more-info-needed'; /** * Should this note exist? */ public static function is_applicable() { return self::should_display_note(); } /** * Returns true if we should display the note. * * @return bool */ 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; } /** * Get the note. * * @return Note */ public static function get_note() { if ( ! self::should_display_note() ) { return; } $content = __( 'We recently asked you if you wanted more information about WooPayments. Run your business and manage your payments in one place with the solution built and supported by WooCommerce.', 'woocommerce' ); $note = new Note(); $note->set_title( __( 'Payments made simple with WooPayments', 'woocommerce' ) ); $note->set_content( $content ); $note->set_content_data( (object) array() ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-admin' ); $note->add_action( 'learn-more', __( 'Learn more here', 'woocommerce' ), 'https://woo.com/payments/' ); return $note; } }