woocommerce_product_downloads_approved_directory_validation_for_shortcodes filter-hookWC 1.0

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

Usage

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)
-

Where the hook is called

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() ) {

Where the hook is used in WooCommerce

Usage not found.