Skip to content

Commit

Permalink
Merge pull request #35 from alleyinteractive/hotfix/email-settings-on…
Browse files Browse the repository at this point in the history
…-template

Hotfix/email settings on template
  • Loading branch information
mogmarsh authored Nov 8, 2023
2 parents 7e553fd + 485d51f commit 4631bc8
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
4 changes: 0 additions & 4 deletions blocks/email-settings/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ interface Option {
*/
export default function Edit() {
const [meta, setMeta] = usePostMeta();
// const meta = {};
// const setMeta = (newMeta: any) => {
// console.log(newMeta);
// };
const {
nb_newsletter_subject: subject,
nb_newsletter_preview: preview,
Expand Down
2 changes: 1 addition & 1 deletion components/emailTypeSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function EmailTypeSelector({
// Set the meta to be the first option if it's not set. This matches what is already
// happpening in the UI.
useEffect(() => {
if (!fromNameValue) {
if (!fromNameValue && fromNames.length > 0) {
fromNameHandler(fromNames[0]);
}
}, [fromNameHandler, fromNameValue]);
Expand Down
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Newsletter Builder
* Plugin URI: https://github.com/alleyinteractive/wp-newsletter-builder
* Description: Interface to manage email newsletters
* Version: 0.3.1
* Version: 0.3.2
* Author: Alley Interactive
* Author URI: https://github.com/alleyinteractive/wp-newsletter-builder
* Requires at least: 5.9
Expand Down
2 changes: 1 addition & 1 deletion src/assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function action_enqueue_block_editor_assets() {
global $post_type;

// Only enqueue the script to register the scripts if supported.
if ( 'nb_newsletter' !== $post_type ) {
if ( 'nb_newsletter' !== $post_type && 'nb_template' !== $post_type ) {
return;
}

Expand Down

0 comments on commit 4631bc8

Please sign in to comment.