Add PDF to WooCommerce Order Email only for the admin copySend email from WooCommerce when order status is changed to a custom order statusChange WooCommerce recipient for admin emailsWoocommerce - Need to send email to specific address based on zip codeHow to detect email recipient in Woocommerce template partial?Insert action after Woocomerce Completed Order Email is sent outWooCommerce New order email manually trigger for some productsAdd an attachment to admin email-notification once order is placed in WoocommerceCustomize order item meta only for WooCommerce admin email notificationsExclude email attachments from specific email notifications in WoocommerceWoocommerce Email Alert: New Order to Store Admin, Processing Order to Customer?
What is this arch-and-tower near a road?
LTSpice: how to setup sinusoidal or exponential voltage source?
What is the highest level of accuracy in motion control a Victorian society could achieve?
Why do Klingons use cloaking devices?
Is this standard Japanese employment negotiations, or am I missing something?
How did the IEC decide to create kibibytes?
Why weren't Gemini capsules given names?
Do the 26 richest billionaires own as much wealth as the poorest 3.8 billion people?
Why does mean tend be more stable in different samples than median?
Can a Time Lord survive with just one heart?
Are "confidant" and "confident" homophones?
PhD: When to quit and move on?
Why no parachutes in the Orion AA2 abort test?
Isn't "Dave's protocol" good if only the database, and not the code, is leaked?
Is it possible to spoof an IP address to an exact number?
What happens if the limit of 4 billion files was exceeded in an ext4 partition?
Why do we need a bootloader separate from our application program in microcontrollers?
Was the 45.9°C temperature in France in June 2019 the highest ever recorded in France?
How can I effectively map a multi-level dungeon?
The Purpose of "Natu"
Has there ever been a cold war other than between the U.S. and the U.S.S.R.?
How to play a D major chord lower than the open E major chord on guitar?
Advice for making/keeping shredded chicken moist?
Is conquering your neighbors to fight a greater enemy a valid strategy?
Add PDF to WooCommerce Order Email only for the admin copy
Send email from WooCommerce when order status is changed to a custom order statusChange WooCommerce recipient for admin emailsWoocommerce - Need to send email to specific address based on zip codeHow to detect email recipient in Woocommerce template partial?Insert action after Woocomerce Completed Order Email is sent outWooCommerce New order email manually trigger for some productsAdd an attachment to admin email-notification once order is placed in WoocommerceCustomize order item meta only for WooCommerce admin email notificationsExclude email attachments from specific email notifications in WoocommerceWoocommerce Email Alert: New Order to Store Admin, Processing Order to Customer?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm using the woocommerce_email_attachments
hook but some reason I need to add some PDF attachment only for the admin copy of new order.
I know that I can trigger this hook only for new orders, and that's ok.
But I can't figure out how can I do this only for some specific recipients.
Is there a way to do this in this hook?
This is basically what I need:
add_filter( 'woocommerce_email_attachments', 'edit_woocommerce_attachments', 10, 3 );
function edit_woocommerce_attachments($attachments, $email_id, $email_object)
if( $email_id === 'new_order')
if($email == 'admin@email.com') $attachments[] = get_attached_file( 612 );
else return;
return $attachments;
wordpress woocommerce email-attachments
add a comment |
I'm using the woocommerce_email_attachments
hook but some reason I need to add some PDF attachment only for the admin copy of new order.
I know that I can trigger this hook only for new orders, and that's ok.
But I can't figure out how can I do this only for some specific recipients.
Is there a way to do this in this hook?
This is basically what I need:
add_filter( 'woocommerce_email_attachments', 'edit_woocommerce_attachments', 10, 3 );
function edit_woocommerce_attachments($attachments, $email_id, $email_object)
if( $email_id === 'new_order')
if($email == 'admin@email.com') $attachments[] = get_attached_file( 612 );
else return;
return $attachments;
wordpress woocommerce email-attachments
add a comment |
I'm using the woocommerce_email_attachments
hook but some reason I need to add some PDF attachment only for the admin copy of new order.
I know that I can trigger this hook only for new orders, and that's ok.
But I can't figure out how can I do this only for some specific recipients.
Is there a way to do this in this hook?
This is basically what I need:
add_filter( 'woocommerce_email_attachments', 'edit_woocommerce_attachments', 10, 3 );
function edit_woocommerce_attachments($attachments, $email_id, $email_object)
if( $email_id === 'new_order')
if($email == 'admin@email.com') $attachments[] = get_attached_file( 612 );
else return;
return $attachments;
wordpress woocommerce email-attachments
I'm using the woocommerce_email_attachments
hook but some reason I need to add some PDF attachment only for the admin copy of new order.
I know that I can trigger this hook only for new orders, and that's ok.
But I can't figure out how can I do this only for some specific recipients.
Is there a way to do this in this hook?
This is basically what I need:
add_filter( 'woocommerce_email_attachments', 'edit_woocommerce_attachments', 10, 3 );
function edit_woocommerce_attachments($attachments, $email_id, $email_object)
if( $email_id === 'new_order')
if($email == 'admin@email.com') $attachments[] = get_attached_file( 612 );
else return;
return $attachments;
wordpress woocommerce email-attachments
wordpress woocommerce email-attachments
edited Mar 26 at 4:07
mujuonly
3,0691 gold badge17 silver badges37 bronze badges
3,0691 gold badge17 silver badges37 bronze badges
asked Mar 25 at 19:29
AmeAme
831 silver badge11 bronze badges
831 silver badge11 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55345142%2fadd-pdf-to-woocommerce-order-email-only-for-the-admin-copy%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55345142%2fadd-pdf-to-woocommerce-order-email-only-for-the-admin-copy%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown