-
Notifications
You must be signed in to change notification settings - Fork 209
Open
Labels
Description
Steps to Reproduce
- Go to Sensei -> Settings -> Emails
- Click on any of the email template to edit it
- Insert or change the button background to any color from the theme palette
- Sign up or purchase a course and open the email in Gmail
What I Expected
I expected the button to show in the same color that I selected in the email editor
What Happened Instead
The email in Gmail looks like this
The button shows up with a transparent background.
PHP / WordPress / Sensei LMS version
PHP - 8.3
WordPress - 6.8.3
Theme - Twentytwentyfive
Sensei LMS version - 4.24.5
Browser / OS version
Chrome 140.0.7339.134 on Mac Sequoia 15.6.1
Context / Source
Once I disable the theme palette from appearing in the button background color choice and select a custom color, it shows up fine in Gmail
Here's the code that I used to disable the theme palette from sensei email template
function twentytwentyfive_remove_theme_colors_sensei_email( $settings, $context ) {
if ( ! isset( $context->post ) || 'sensei_email' !== $context->post->post_type ) {
return $settings;
}
if ( isset( $settings['color']['palette']['theme'] ) ) {
unset( $settings['color']['palette']['theme'] );
}
if ( isset( $settings['__experimentalFeatures']['color']['palette']['theme'] ) ) {
unset( $settings['__experimentalFeatures']['color']['palette']['theme'] );
}
return $settings;
}
add_filter( 'block_editor_settings_all', 'twentytwentyfive_remove_theme_colors_sensei_email', 9, 2 );
There was an old PR to disable default palette which was causing a similar issue.