woocommerce_return_previous_exceptions │ хук-фильтр │ WC 1.0

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 $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.
По умолчанию: WP_DEBUG value

Где вызывается хук

В файле: /src/StoreApi/Utilities/CheckoutTrait.php
woocommerce_return_previous_exceptions
woocommerce/src/StoreApi/Utilities/CheckoutTrait.php 192
if ( apply_filters( 'woocommerce_return_previous_exceptions', Constants::is_true( 'WP_DEBUG' ) ) && $e->getPrevious() ) {

Где используется хук в WooCommerce

Использование не найдено.