lolitsjohnnyboy
Forum Replies Created
-
Ultimate Member Support can you please answer my question about the roles problem I’ve created 3 weeks ago? The roles select still not works with foreign roles from WooCommerce. I need some assistance here. The crazy thing is that when I set it as default role and remove the role select all new users having this role but with the role dropdown it’s not working.
Ultimate Member Support can you please answer my question about the roles problem I’ve created 3 weeks ago? The roles select still not works with foreign roles from WooCommerce. I need some assistance here. The crazy thing is that when I set it as default role and remove the role select all new users having this role but with the role dropdown it’s not working.
Ultimate Member Support can you please answer my question about the roles problem I’ve created 3 weeks ago? The roles select still not works with foreign roles from WooCommerce. I need some assistance here. The crazy thing is that when I set it as default role and remove the role select all new users having this role but with the role dropdown it’s not working.
This is the solution: The problem is that you can’t add css in the head. You need to append it directly to the html. At this point you’ve a problem when you want to include an external css file. In PHP you can do this:
/** * Apply css to UM email message from template */ add_filter( 'um_email_send_message_content', 'apply_style_to_email', 10, 99); function apply_style_to_email($message, $slug, $args ) { //Get Emogrifier class include_once get_home_path() . 'wp-content/themes/DiviChild/ultimate-member/libraries/class-emogrifier.php'; ob_start(); include_once get_home_path() . 'wp-content/themes/DiviChild/woocommerce/emails/email-styles.php'; $css = apply_filters( 'woocommerce_email_styles', ob_get_clean() ); // apply CSS styles inline for picky email clients. try { $emogrifier = new Emogrifier( $message, $css ); $message = $emogrifier->emogrify(); } catch ( Exception $e ) { $logger = wc_get_logger(); $logger->error( $e->getMessage(), array( 'source' => 'emogrifier' ) ); } return $message; }
You can use a library to apply the css to the message before sending it. Just google for the library and include it like I did it.
- This reply was modified 6 years, 3 months ago by lolitsjohnnyboy.