Created
March 7, 2018 19:40
-
-
Save danielbitzer/290f4d8acd382c037c044b45d29d3697 to your computer and use it in GitHub Desktop.
AutomateWoo - Add attachment to workflow email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'automatewoo/workflow/mailer', 'my_add_attachment_to_workflow_emails', 10, 2 ); | |
/** | |
* @param Mailer $mailer | |
* @param Workflow_Email $workflow_email | |
* @return Mailer | |
*/ | |
function my_add_attachment_to_workflow_emails( $mailer, $workflow_email ) { | |
$workflow = $workflow_email->workflow; | |
$mailer->attachments[] = get_template_directory() . '/terms.pdf'; | |
return $mailer; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Daniel,
This is Ahir. A beginner for the Autowoo plugin. I have a requirement which is like - "it needs to add a late fee to the subscription if the subscription expired but not paid. Will you please help me with how to build that feature? I am creating a custom function for that but ultimately did not reach to the solution.