WC_Email::get_bcc_recipient
Get valid Bcc recipients.
Метод класса: WC_Email{}
Хуки из метода
Возвращает
string.
Использование
$WC_Email = new WC_Email(); $WC_Email->get_bcc_recipient();
Код WC_Email::get_bcc_recipient() WC Email::get bcc recipient WC 11.3.0
public function get_bcc_recipient() {
/**
* Filter the Bcc recipient for the email.
*
* @since 9.8.0
* @since 11.2.0 The base value is empty when the email does not support Cc/Bcc.
* @param string $bcc Bcc recipient.
* @param object $object The object (ie, product or order) this email relates to, if any.
* @param WC_Email $email WC_Email instance managing the email.
*/
$bcc = apply_filters( 'woocommerce_email_bcc_recipient_' . $this->id, $this->supports_cc_bcc() ? $this->bcc : '', $this->object, $this );
$bccs = array_map( 'trim', explode( ',', $bcc ?? '' ) );
$bccs = array_filter( $bccs, 'is_email' );
$bccs = array_map( 'sanitize_email', $bccs );
return implode( ', ', $bccs );
}