set_title( __( 'Sell worldwide in multiple currencies', 'woocommerce-payments' ) ); $note->set_content( __( 'Boost your international sales by allowing your customers to shop and pay in their local currency.', 'woocommerce-payments' ) ); $note->set_content_data( (object) [] ); $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL ); $note->set_name( self::NOTE_NAME ); $note->set_source( 'woocommerce-payments' ); $note->add_action( self::NOTE_NAME, __( 'Set up now', 'woocommerce-payments' ), self::NOTE_SETUP_URL, 'unactioned', true ); return $note; } /** * Add the note if it passes predefined conditions. */ public static function possibly_add_note() { // Don't add the note if the merchant didn't create a WCPay account yet. if ( is_null( self::$account ) || ! self::$account->is_provider_connected() ) { return; } if ( ! self::can_be_added() ) { return; } $note = self::get_note(); $note->save(); } /** * Sets the account service instance reference on the class. * * @param MultiCurrencyAccountInterface $account account service instance. */ public static function set_account( MultiCurrencyAccountInterface $account ) { self::$account = $account; } }