diff --git a/mailpoet/lib/EmailEditor/Integrations/MailPoet/EditorPageRenderer.php b/mailpoet/lib/EmailEditor/Integrations/MailPoet/EditorPageRenderer.php index 710341f390..1497ab995c 100644 --- a/mailpoet/lib/EmailEditor/Integrations/MailPoet/EditorPageRenderer.php +++ b/mailpoet/lib/EmailEditor/Integrations/MailPoet/EditorPageRenderer.php @@ -111,7 +111,7 @@ class EditorPageRenderer { 'is_premium_plugin_active' => (bool)$this->servicesChecker->isPremiumPluginActive(), 'current_wp_user_email' => esc_js($currentUserEmail), 'editor_settings' => $this->settingsController->get_settings(), - 'editor_theme' => $this->themeController->get_theme()->get_raw_data(), + 'editor_theme' => $this->themeController->get_base_theme()->get_raw_data(), 'user_theme_post_id' => $this->userTheme->get_user_theme_post()->ID, 'urls' => [ 'listings' => admin_url('admin.php?page=mailpoet-newsletters'), diff --git a/packages/js/email-editor/src/components/styles-sidebar/screens/screen-colors.tsx b/packages/js/email-editor/src/components/styles-sidebar/screens/screen-colors.tsx index 27a2b651fb..404c25fe2d 100644 --- a/packages/js/email-editor/src/components/styles-sidebar/screens/screen-colors.tsx +++ b/packages/js/email-editor/src/components/styles-sidebar/screens/screen-colors.tsx @@ -17,7 +17,7 @@ import { useEmailStyles } from '../../../hooks'; import { storeName } from '../../../store'; export function ScreenColors(): JSX.Element { - const { styles, defaultStyles, updateStyles } = useEmailStyles(); + const { userStyles, styles, updateStyles } = useEmailStyles(); const theme = useSelect( ( select ) => select( storeName ).getTheme(), [] ); return ( @@ -30,8 +30,8 @@ export function ScreenColors(): JSX.Element { ) } /> void; updateStyles: ( newStyles: StyleProperties ) => void; @@ -144,8 +145,9 @@ export const useEmailStyles = (): EmailStylesData => { ); return { - styles: deepmerge.all( [ defaultStyles || {}, styles || {} ] ), - defaultStyles, + styles: deepmerge.all( [ defaultStyles || {}, styles || {} ] ), // Merged styles + userStyles: userTheme?.styles, // Styles defined by user + defaultStyles, // Default styles from editors theme.json updateStyleProp, updateStyles, };