/var/www/html_uk/wp-content/plugins/automatewoo/includes/Notifications/Addons/BirthdaysCheck.php


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
52
53
54
55
56
<?php

namespace AutomateWoo\Notifications;

use 
Automattic\WooCommerce\Admin\Notes\Note;
use 
Automattic\WooCommerce\Admin\Notes\NoteTraits;

defined'ABSPATH' ) || exit;

/**
 * Class to add Inbox Notification when the Birthdays add-on is activated.
 *
 * @since 5.8.5
 *
 * @package AutomateWoo\Notifications
 */
class BirthdaysCheck extends AbstractAddonCheck {
    use 
NoteTraits;

    const 
NOTE_NAME 'automatewoo-birthdays-check';

    
/**
     * Get the addon ID
     *
     * @return string
     */
    
public function get_addon_id(): string {
        return 
'automatewoo-birthdays';
    }

    
/**
     * Get the contents of the notification.
     *
     * @return string
     */
    
public static function get_content(): string {
        return 
__'AutomateWoo Birthdays add-on was successfully activated.''automatewoo' );
    }

    
/**
     * Get Note from parent and add action directing merchants to Birthdays settings.
     *
     * @return Note
     */
    
public static function get_note(): Note {
        
$note parent::get_note();

        
$note->add_action(
            
'aw-addons-birthdays',
            
__'Get Started''automatewoo' ),
            
admin_url'admin.php?page=automatewoo-settings&tab=birthdays' )
        );

        return 
$note;
    }
}