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

Controls whether shortcodes should be resolved and validated using the Approved Download Directory feature.

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

add_filter( 'woocommerce_product_downloads_approved_directory_validation_for_shortcodes', 'wp_kama_woocommerce_product_downloads_approved_directory_validation_for_shortcodes_filter' );

/**
 * Function for `woocommerce_product_downloads_approved_directory_validation_for_shortcodes` filter-hook.
 * 
 * @param bool $should_validate 
 *
 * @return bool
 */
function wp_kama_woocommerce_product_downloads_approved_directory_validation_for_shortcodes_filter( $should_validate ){

	// filter...
	return $should_validate;
}
$should_validate(true|false)
-

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

Synchronize::process_product()
woocommerce_product_downloads_approved_directory_validation_for_shortcodes
WC_Product_Download::approved_directory_checks()
woocommerce_product_downloads_approved_directory_validation_for_shortcodes
woocommerce/src/Internal/ProductDownloads/ApprovedDirectories/Synchronize.php 229
if ( apply_filters( 'woocommerce_product_downloads_approved_directory_validation_for_shortcodes', true ) && 'shortcode' === $downloadable->get_type_of_file_path() ) {
woocommerce/includes/class-wc-product-download.php 222
if ( apply_filters( 'woocommerce_product_downloads_approved_directory_validation_for_shortcodes', true ) && 'shortcode' === $this->get_type_of_file_path() ) {

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

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