Skip to content

Commit

Permalink
Merge pull request #106 from MaximilianoRicoTabo/feature/add-email-te…
Browse files Browse the repository at this point in the history
…mplates-to-core-area

Add Pay-by-Check email templates to Templates Area
  • Loading branch information
dparker1005 committed Dec 11, 2023
2 parents 46c7593 + 2d19675 commit 1aed933
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions pmpro-pay-by-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -1327,3 +1327,27 @@ function pmpropbc_plugin_row_meta($links, $file) {
return $links;
}
add_filter('plugin_row_meta', 'pmpropbc_plugin_row_meta', 10, 2);

/**
* Add the Pay by Check email templates to the Core PMPro Email Templates.
*
* @param array $template - The existing PMPro Email Templates.
* @return array $template - The updated PMPro Email Templates.
* @since TBD.
*/
function pmpropbc_email_template_to_pmproet_add_on( $template ) {

$template['check_pending'] = array(
'subject' => 'New Invoice for !!display_name!! at !!sitename!!',
'description' => 'Pay By Check - Check Pending',
'body' => file_get_contents( PMPRO_PAY_BY_CHECK_DIR . '/email/check_pending.html' ),
);
$template['check_pending_reminder'] = array(
'subject' => 'Reminder: New Invoice for !!display_name!! at !!sitename!!',
'description' => 'Pay By Check - Check Pending Reminder',
'body' => file_get_contents( PMPRO_PAY_BY_CHECK_DIR . '/email/check_pending_reminder.html' ),
);

return $template;
}
add_filter( 'pmproet_templates', 'pmpropbc_email_template_to_pmproet_add_on' );

0 comments on commit 1aed933

Please sign in to comment.