woocommerce_return_previous_exceptions
Allows to check if WP_DEBUG mode is enabled before returning previous Exception.
Usage
add_filter( 'woocommerce_return_previous_exceptions', 'wp_kama_woocommerce_return_previous_exceptions_filter' );
/**
* Function for `woocommerce_return_previous_exceptions` filter-hook.
*
* @param bool $return_previous_exceptions Whether to include the previous exception.
*
* @return bool
*/
function wp_kama_woocommerce_return_previous_exceptions_filter( $return_previous_exceptions ){
// filter...
return $return_previous_exceptions;
}
- $return_previous_exceptions(true|false)
- Whether to include the previous exception.
Default: WP_DEBUG value
Where the hook is called
woocommerce_return_previous_exceptions
woocommerce/src/StoreApi/Utilities/CheckoutTrait.php 129
if ( apply_filters( 'woocommerce_return_previous_exceptions', Constants::is_true( 'WP_DEBUG' ) ) && $e->getPrevious() ) {