class-wc-payments-notes-instant-deposits-eligible.php
1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* Notify merchant that they are eligible for Instant Deposits.
*
* @package WooCommerce\Payments\Admin
*/
use Automattic\WooCommerce\Admin\Notes\Note;
use Automattic\WooCommerce\Admin\Notes\NoteTraits;
defined( 'ABSPATH' ) || exit;
/**
* Class WC_Payments_Notes_Set_Https_For_Checkout
*/
class WC_Payments_Notes_Instant_Deposits_Eligible {
use NoteTraits;
/**
* Name of the note for use in the database.
*/
const NOTE_NAME = 'wc-payments-notes-instant-deposits-eligible';
/**
* Get the note.
*/
public static function get_note() {
$note = new Note();
$note->set_title( __( 'You’re now eligible to receive Instant Deposits with WooCommerce Payments', 'woocommerce-payments' ) );
$note->set_content(
WC_Payments_Utils::esc_interpolated_html(
__( "Get immediate access to your funds when you need them – including nights, weekends, and holidays. With WooCommerce Payments' <a>Instant Deposits feature</a>, you're able to transfer your earnings to a debit card within minutes.", 'woocommerce-payments' ),
[ 'a' => '<a href="https://woocommerce.com/document/payments/instant-deposits/">' ]
)
);
$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,
__( 'Request an instant deposit', 'woocommerce-payments' ),
'https://woocommerce.com/document/payments/instant-deposits/#section-2',
'unactioned',
true
);
return $note;
}
}