• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
    • Help
      • Online help
      • Learn Git
      • Welcome to Bitbucket
      • Keyboard shortcuts
    • Log In
    Blackrock
    1. Blackrock

    main

    Public
    Actions
    • Clone

    Learn more about cloning repositories

    You have read-only access

    Navigation
    • Source
    • Commits
    • Branches
    • All Branches Graph
    • Graphs
    • Forks
    1. Blackrock
    2. main

    Source

    main/wp-content/plugins/woocommerce-admin/src/Notes/ManageOrdersOnTheGo.php
    Артем ШиряевАртем Ширяев committed 554847ddcb906 Apr 2021
    Raw file
    Source viewDiff to previous
    ​x
     
    1
    <?php
    2
    /**
    3
     * WooCommerce Admin Manage orders on the go note.
    4
     *
    5
     * Adds a note to download the mobile app to manage orders on the go.
    6
     */
    7
    ​
    8
    namespace Automattic\WooCommerce\Admin\Notes;
    9
    ​
    10
    defined( 'ABSPATH' ) || exit;
    11
    ​
    12
    /**
    13
     * Manage_Orders_On_The_Go
    14
     */
    15
    class ManageOrdersOnTheGo {
    16
        /**
    17
         * Note traits.
    18
         */
    19
        use NoteTraits;
    20
    ​
    21
        /**
    22
         * Name of the note for use in the database.
    23
         */
    24
        const NOTE_NAME = 'wc-admin-manage-orders-on-the-go';
    25
    ​
    26
        /**
    27
         * Get the note.
    28
         *
    29
         * @return Note|null
    30
         */
    31
        public static function get_note() {
    32
            // Only add this note if this store is at least 6 months old.
    33
            $six_months_in_seconds = MONTH_IN_SECONDS * 6;
    34
            if ( ! self::wc_admin_active_for( $six_months_in_seconds ) ) {
    35
                return;
    36
            }
    37
    ​
    38
            // Check that the previous mobile app notes have not been actioned.
    39
            if ( MobileApp::has_note_been_actioned() ) {
    40
                return;
    41
            }
    42
            if ( RealTimeOrderAlerts::has_note_been_actioned() ) {
    43
                return;
    44
            }
    45
    ​
    46
            $note = new Note();
    47
    ​
    48
            $note->set_title( __( 'Manage your orders on the go', 'woocommerce-admin' ) );
    49
            $note->set_content( __( 'Look for orders, customer info, and process refunds in one click with the Woo app.', 'woocommerce-admin' ) );
    50
            $note->set_content_data( (object) array() );
    51
            $note->set_type( Note::E_WC_ADMIN_NOTE_INFORMATIONAL );
    52
            $note->set_name( self::NOTE_NAME );
    53
            $note->set_source( 'woocommerce-admin' );
    54
            $note->add_action(
    55
                'learn-more',
    56
                __( 'Learn more', 'woocommerce-admin' ),
    57
                'https://woocommerce.com/mobile/?utm_source=inbox'
    58
            );
    59
    ​
    60
            return $note;
    61
        }
    62
    }
    • Git repository management for enterprise teams powered by Atlassian Bitbucket
    • Atlassian Bitbucket v5.10.1
    • Documentation
    • Contact Support
    • Request a feature
    • About
    • Contact Atlassian
    Atlassian

    Everything looks good. Well let you know here if theres anything you should know about.