woocommerce_email_content_post_data

woocommerce_email_content_post_data

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.10.5.2

apply_filters('woocommerce_email_content_post_data') is found 1 times:

  • /src/Internal/EmailEditor/WCTransactionalEmails/WCTransactionalEmailPostsGenerator.php line 282
    		 * @param array     $post_data  The post data array to be used for wp_insert_post().
    		 * @param string    $email_type The email type identifier (e.g., 'customer_processing_order').
    		 * @param \WC_Email $email_data The WooCommerce email object.
    		 */
    		$post_data = apply_filters( 'woocommerce_email_content_post_data', $post_data, $email_type, $email_data );
    
    		$post_id = wp_insert_post( $post_data, true );
    
    		if ( is_wp_error( $post_id ) ) {
    			throw new \Exception( esc_html( $post_id->get_error_message() ) );
    		}