Skip to content

Instantly share code, notes, and snippets.

@danielbitzer
Created March 7, 2018 19:40
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save danielbitzer/290f4d8acd382c037c044b45d29d3697 to your computer and use it in GitHub Desktop.
Save danielbitzer/290f4d8acd382c037c044b45d29d3697 to your computer and use it in GitHub Desktop.
AutomateWoo - Add attachment to workflow email
<?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;
}
@ahirdas
Copy link

ahirdas commented Mar 22, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment