woocommerce_new_order_email_allows_resend
Controls if new order emails can be resend multiple times.
Использование
add_filter( 'woocommerce_new_order_email_allows_resend', 'wp_kama_woocommerce_new_order_email_allows_resend_filter' ); /** * Function for `woocommerce_new_order_email_allows_resend` filter-hook. * * @param bool $allows Defaults to false. * * @return bool */ function wp_kama_woocommerce_new_order_email_allows_resend_filter( $allows ){ // filter... return $allows; }
- $allows(true|false)
- Defaults to false.
Список изменений
С версии 5.0.0 | Введена. |
Где вызывается хук
woocommerce_new_order_email_allows_resend
woocommerce/includes/emails/class-wc-email-new-order.php 107
if ( $email_already_sent && ! apply_filters( 'woocommerce_new_order_email_allows_resend', false ) ) {
Где используется хук в WooCommerce
woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php 155
add_filter( 'woocommerce_new_order_email_allows_resend', '__return_true' );
woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-actions.php 157
remove_filter( 'woocommerce_new_order_email_allows_resend', '__return_true' );