Automattic\WooCommerce\Internal\Admin\Notes
OrderMilestones::get_note_action_for_milestone()
Get the appropriate note action for a given milestone.
Метод класса: OrderMilestones{}
Хуков нет.
Возвращает
Массив
. Note actoion (name, label, query) for the milestone.
Использование
$result = OrderMilestones::get_note_action_for_milestone( $milestone );
- $milestone(int) (обязательный)
- Order milestone.
Код OrderMilestones::get_note_action_for_milestone() OrderMilestones::get note action for milestone WC 9.3.1
public static function get_note_action_for_milestone( $milestone ) { switch ( $milestone ) { case 1: return array( 'name' => 'learn-more', 'label' => __( 'Learn more', 'woocommerce' ), 'query' => 'https://woocommerce.com/document/managing-orders/?utm_source=inbox&utm_medium=product', ); case 10: return array( 'name' => 'browse', 'label' => __( 'Browse', 'woocommerce' ), 'query' => 'https://woocommerce.com/success-stories/?utm_source=inbox&utm_medium=product', ); case 100: case 250: case 500: case 1000: case 5000: case 10000: case 500000: case 1000000: return array( 'name' => 'review-orders', 'label' => __( 'Review your orders', 'woocommerce' ), 'query' => '?page=wc-admin&path=/analytics/orders', ); default: return array( 'name' => '', 'label' => '', 'query' => '', ); } }