WC_Background_Emailer::task( array $callback )
Task
Description Description
Override this method to perform any actions required on each queue item. Return the modified item for further processing in the next pass through. Or, return false to remove the item from the queue.
Parameters Parameters
- $callback
-
(Required) Update callback function.
Return Return
(mixed)
Source Source
File: includes/class-wc-background-emailer.php
protected function task( $callback ) { if ( isset( $callback['filter'], $callback['args'] ) ) { try { WC_Emails::send_queued_transactional_email( $callback['filter'], $callback['args'] ); } catch ( Exception $e ) { if ( Constants::is_true( 'WP_DEBUG' ) ) { trigger_error( 'Transactional email triggered fatal error for callback ' . esc_html( $callback['filter'] ), E_USER_WARNING ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_trigger_error } } } return false; }