Notes: update sales record link
This commit is contained in:
parent
ed21ccf62e
commit
2e0ef7f93c
|
@ -50,7 +50,7 @@ class WC_Admin_Events {
|
|||
*
|
||||
* Note: WC_Admin_Notes_Order_Milestones::other_milestones is hooked to this as well.
|
||||
*/
|
||||
protected function do_wc_admin_daily() {
|
||||
public function do_wc_admin_daily() {
|
||||
WC_Admin_Notes_New_Sales_Record::possibly_add_sales_record_note();
|
||||
WC_Admin_Notes_Giving_Feedback_Notes::add_notes_for_admin_giving_feedback();
|
||||
WC_Admin_Notes_Mobile_App::possibly_add_mobile_app_note();
|
||||
|
|
|
@ -99,6 +99,8 @@ class WC_Admin_Notes_New_Sales_Record {
|
|||
// We only want one sales record note at any time in the inbox, so we delete any other first.
|
||||
WC_Admin_Notes::delete_notes_with_name( self::NOTE_NAME );
|
||||
|
||||
$report_url = '?page=wc-admin#/analytics/revenue?period=custom&compare=previous_year&after=' . $yesterday . '&before=' . $yesterday;
|
||||
|
||||
// And now, create our new note.
|
||||
$note = new WC_Admin_Note();
|
||||
$note->set_title( __( 'New sales record!', 'woocommerce-admin' ) );
|
||||
|
@ -108,7 +110,7 @@ class WC_Admin_Notes_New_Sales_Record {
|
|||
$note->set_icon( 'trophy' );
|
||||
$note->set_name( self::NOTE_NAME );
|
||||
$note->set_source( 'woocommerce-admin' );
|
||||
$note->add_action( 'view-report', __( 'View report', 'woocommerce-admin' ), '?page=wc-admin#/analytics' );
|
||||
$note->add_action( 'view-report', __( 'View report', 'woocommerce-admin' ), $report_url );
|
||||
$note->save();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue