Custom Functions ( static pdf to order email)
-
I added the following code to “My custom functions” plugin by (spacex-chimp)
add_filter( 'woocommerce_email_attachments', 'attach_terms_conditions_pdf_to_email', 10, 3); function attach_terms_conditions_pdf_to_email ( $attachments , $id, $object ) { $allowed_statuses = array( 'new_order' ); if( isset( $id ) && in_array ( $id, $allowed_statuses ) ) { $public_html/jakabstore.com/wp-content/uploads/2019/11/Privacy-Policy.pdf = get_template_directory() . '/terms.pdf'; $attachments[] = $public_html/jakabstore.com/wp-content/uploads/2019/11/Privacy-Policy.pdf; } return $attachments; }
I followed this instructions:
attach-static-pdf-to-order-confirmation-email/And I got this error message
Parse error: syntax error, unexpected ‘/’ in /home/legevro0/public_html/jakabstore.com/wp-content/plugins/my-custom-functions/inc/php/functional.php(103) : eval()’d code on line 5
The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.
- The topic ‘Custom Functions ( static pdf to order email)’ is closed to new replies.