@@ -664,6 +664,9 @@ discard block |
||
664 | 664 | return $sent; |
665 | 665 | } |
666 | 666 | |
667 | +/** |
|
668 | + * @return string |
|
669 | + */ |
|
667 | 670 | function wpinv_mail_get_from_address() { |
668 | 671 | $from_address = apply_filters( 'wpinv_mail_from_address', wpinv_get_option( 'email_from' ) ); |
669 | 672 | return sanitize_email( $from_address ); |
@@ -1123,6 +1126,9 @@ discard block |
||
1123 | 1126 | } |
1124 | 1127 | add_filter( 'wpinv_settings_sections_emails', 'wpinv_settings_sections_emails', 10, 1 ); |
1125 | 1128 | |
1129 | +/** |
|
1130 | + * @param string $email_type |
|
1131 | + */ |
|
1126 | 1132 | function wpinv_email_is_enabled( $email_type ) { |
1127 | 1133 | $emails = wpinv_get_emails(); |
1128 | 1134 | $enabled = isset( $emails[$email_type] ) && wpinv_get_option( $email_type . '_active', 0 ) ? true : false; |