Skip to content

Commit 4631bc8

Browse files
authored
Merge pull request #35 from alleyinteractive/hotfix/email-settings-on-template
Hotfix/email settings on template
2 parents 7e553fd + 485d51f commit 4631bc8

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

blocks/email-settings/edit.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ interface Option {
5454
*/
5555
export default function Edit() {
5656
const [meta, setMeta] = usePostMeta();
57-
// const meta = {};
58-
// const setMeta = (newMeta: any) => {
59-
// console.log(newMeta);
60-
// };
6157
const {
6258
nb_newsletter_subject: subject,
6359
nb_newsletter_preview: preview,

components/emailTypeSelector/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function EmailTypeSelector({
7878
// Set the meta to be the first option if it's not set. This matches what is already
7979
// happpening in the UI.
8080
useEffect(() => {
81-
if (!fromNameValue) {
81+
if (!fromNameValue && fromNames.length > 0) {
8282
fromNameHandler(fromNames[0]);
8383
}
8484
}, [fromNameHandler, fromNameValue]);

plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Newsletter Builder
44
* Plugin URI: https://github.com/alleyinteractive/wp-newsletter-builder
55
* Description: Interface to manage email newsletters
6-
* Version: 0.3.1
6+
* Version: 0.3.2
77
* Author: Alley Interactive
88
* Author URI: https://github.com/alleyinteractive/wp-newsletter-builder
99
* Requires at least: 5.9

src/assets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function action_enqueue_block_editor_assets() {
102102
global $post_type;
103103

104104
// Only enqueue the script to register the scripts if supported.
105-
if ( 'nb_newsletter' !== $post_type ) {
105+
if ( 'nb_newsletter' !== $post_type && 'nb_template' !== $post_type ) {
106106
return;
107107
}
108108

0 commit comments

Comments
 (0)