WooCommerce Plugin Preview Email Template Fix
- or -
Post a project like this1945
€20(approx. $21)
- Posted:
- Proposals: 8
- Remote
- #2225267
- Awarded
Software Engineer | WordPress | WooCommerce | SHOPIFY | PHP | LARAVEL | ROR | INTEGRATION |WEB DEVELOPMENT | THEME DEVELOPMENT | PLUGIN DEVELOPMENT |
Islamabad
Shopify, Wordpress, Woocommerce, Bigcommerce, PHP, Wix, Squarespace, Photoshop, Magento, Opencart , Joomla expert
Chandigarh
Top rated PHP Web Development | WordPress | Magento | Drupal | OpenCart | PrestaShop | Joomla
Leicester
1011901205012639206762093803688105075415058831747615
Description
Experience Level: Entry
Estimated project duration: 1 day or less
i have this part of code:
// load the email classs
$wc_emails = new WC_Emails();
$emails = $wc_emails->get_emails();
// select the email we want & trigger it to send
$email = $emails[ $email_class ];
// send email
$email->trigger( $wc_email_test_order_id );
// preview email content for browser
echo apply_filters( 'woocommerce_mail_content', $email->style_inline( $email->get_content_html() ) );
It is working this way.
1. select email, 2. send email, 3. preview email. Everything in one function.
I need to separate sending and previewing emails.
- if I remove echo condent for broser. It send email. This is ok.
- if I remove the triger / echo content for broser not work alone without the trigger. This is the issue. I need to make it work without the trigger (without sending emails out)
// load the email classs
$wc_emails = new WC_Emails();
$emails = $wc_emails->get_emails();
// select the email we want & trigger it to send
$email = $emails[ $email_class ];
// send email
$email->trigger( $wc_email_test_order_id );
// preview email content for browser
echo apply_filters( 'woocommerce_mail_content', $email->style_inline( $email->get_content_html() ) );
It is working this way.
1. select email, 2. send email, 3. preview email. Everything in one function.
I need to separate sending and previewing emails.
- if I remove echo condent for broser. It send email. This is ok.
- if I remove the triger / echo content for broser not work alone without the trigger. This is the issue. I need to make it work without the trigger (without sending emails out)
Jozef P.
73% (3)Projects Completed
2
Freelancers worked with
2
Projects awarded
67%
Last project
30 Apr 2019
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies