Skip to content

Commit

Permalink
Store: Add a setting for the new order notification. (#19196)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinshreve authored Oct 31, 2017
1 parent 5bec866 commit ed8541e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
24 changes: 15 additions & 9 deletions client/me/notification-settings/blogs-settings/blog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ class BlogSettings extends Component {
'is-expanded': isExpanded,
} );

const settingKeys = [
'new_comment',
'comment_like',
'post_like',
'follow',
'achievement',
'mentions',
'scheduled_publicize',
];

if ( site.options.is_wpcom_store ) {
settingKeys.push( 'store_order' );
}

return (
<Card className={ styles }>
<Header { ...{ site, settings, disableToggle } } onToggle={ this.onToggle } />
Expand All @@ -72,15 +86,7 @@ class BlogSettings extends Component {
onSave,
onSaveToAll,
} }
settingKeys={ [
'new_comment',
'comment_like',
'post_like',
'follow',
'achievement',
'mentions',
'scheduled_publicize',
] }
settingKeys={ settingKeys }
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion client/me/notification-settings/settings-form/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @format */
export const NOTIFICATIONS_EXCEPTIONS = {
email: [ 'achievement', 'scheduled_publicize' ],
email: [ 'achievement', 'scheduled_publicize', 'store_order' ],
};
2 changes: 2 additions & 0 deletions client/me/notification-settings/settings-form/locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const settingLabels = {
achievement: () => i18n.translate( 'Site achievements' ),
mentions: () => i18n.translate( 'Username mentions' ),
scheduled_publicize: () => i18n.translate( 'Post Publicized' ),

store_order: () => i18n.translate( 'New order' ),
};

export const getLabelForStream = stream =>
Expand Down
2 changes: 1 addition & 1 deletion client/state/sites/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function requestSites() {
fields:
'ID,URL,name,capabilities,jetpack,visible,is_private,is_vip,icon,plan,jetpack_modules,single_user_site,is_multisite,options', //eslint-disable-line max-len
options:
'is_mapped_domain,unmapped_url,admin_url,is_redirect,is_automated_transfer,allowed_file_types,show_on_front,main_network_site,jetpack_version,software_version,default_post_format,created_at,frame_nonce,publicize_permanently_disabled,page_on_front,page_for_posts,advanced_seo_front_page_description,advanced_seo_title_formats,verification_services_codes,podcasting_archive,is_domain_only,default_sharing_status,default_likes_enabled,wordads,upgraded_filetypes_enabled,videopress_enabled,permalink_structure,gmt_offset,signup_is_store,has_pending_automated_transfer', //eslint-disable-line max-len
'is_mapped_domain,unmapped_url,admin_url,is_redirect,is_automated_transfer,allowed_file_types,show_on_front,main_network_site,jetpack_version,software_version,default_post_format,created_at,frame_nonce,publicize_permanently_disabled,page_on_front,page_for_posts,advanced_seo_front_page_description,advanced_seo_title_formats,verification_services_codes,podcasting_archive,is_domain_only,default_sharing_status,default_likes_enabled,wordads,upgraded_filetypes_enabled,videopress_enabled,permalink_structure,gmt_offset,is_wpcom_store,signup_is_store,has_pending_automated_transfer', //eslint-disable-line max-len
} )
.then( response => {
dispatch( receiveSites( response.sites ) );
Expand Down

0 comments on commit ed8541e

Please sign in to comment.