Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Gets User Registration Emails 'Admin Email' email content [DEFAULT PLUGIN MESSAGE]
- //$messageToBeWrapped = UR_Settings_Admin_Email::ur_get_admin_email();
- $messageToBeWrapped = new UR_Settings_Admin_Email();
- //var_dump($messageToBeWrapped);
- $messageToBeWrapped = $messageToBeWrapped->ur_get_admin_email();
- $messageToBeWrapped = get_option( 'user_registration_admin_email', $messageToBeWrapped );
- // Still need to grab 'Email Subject' field from User Registration
- $email_heading = 'New User';
- $message = $messageToBeWrapped;
- $plain_text = false;
- // Get woocommerce mailer from instance
- $mailer = WC()->mailer();
- // Wrap message using woocommerce html email template
- $wrapped_message = $mailer->wrap_message($email_heading, $message);
- // Create new WC_Email instance
- $wc_email = new WC_Email;
- // Style the wrapped message with woocommerce inline styles
- $html_message = $wc_email->style_inline($wrapped_message);
- $to = 'franco@root3marketing.com';
- $subject = 'Test Email Subject!';
- $body = $html_message;
- $headers = array('Content-Type: text/html; charset=UTF-8');
- var_dump($body);
- wp_mail( $to, $subject, $body, $headers );
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement