diff --git a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox.js b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox.js index 51765784538..20612dcb971 100644 --- a/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox.js +++ b/plugins/woocommerce-admin/client/header/activity-panel/panels/inbox.js @@ -33,6 +33,18 @@ class InboxPanel extends Component { this.props.updateCurrentUserData( userDataFields ); } + handleActionClick( event, note_id, action_id ) { + const { triggerNoteAction } = this.props; + const href = event.target.href || ''; + + if ( 'http' === href.substr( 0, 4 ).toLowerCase() ) { + event.preventDefault(); + window.open( href, '_blank' ); + } + + triggerNoteAction( note_id, action_id ); + } + renderEmptyCard() { return ( triggerNoteAction( note.id, action.id ) } + onClick={ e => this.handleActionClick( e, note.id, action.id ) } > { action.label }