woocommerce_return_previous_exceptions
Allows to check if WP_DEBUG mode is enabled before returning previous Exception.
Использование
add_filter( 'woocommerce_return_previous_exceptions', 'wp_kama_woocommerce_return_previous_exceptions_filter' );
/**
* Function for `woocommerce_return_previous_exceptions` filter-hook.
*
* @param bool $Constants::is_true The WP_DEBUG mode.
*
* @return bool
*/
function wp_kama_woocommerce_return_previous_exceptions_filter( $Constants::is_true ){
// filter...
return $Constants::is_true;
}
- $Constants::is_true(true|false)
- The WP_DEBUG mode.
Где вызывается хук
woocommerce_return_previous_exceptions
woocommerce/src/StoreApi/Utilities/CheckoutTrait.php 96
if ( apply_filters( 'woocommerce_return_previous_exceptions', Constants::is_true( 'WP_DEBUG' ) ) && $e->getPrevious() ) {