woocommerce_product_downloads_approved_directory_validation_for_shortcodes, true
woocommerce_product_downloads_approved_directory_validation_for_shortcodes, true
Appears in: woocommerce.11.0.0
Hook Type: filter
Displaying hooks found in version: woocommerce.11.0.0apply_filters('woocommerce_product_downloads_approved_directory_validation_for_shortcodes, true') is found 2 times:
- /includes/class-wc-product-download.php line 253
* Controls whether shortcodes should be resolved and validated using the Approved Download Directory feature. * * @param bool $should_validate */ if ( apply_filters( 'woocommerce_product_downloads_approved_directory_validation_for_shortcodes', true ) && 'shortcode' === $this->get_type_of_file_path() ) { $download_file = do_shortcode( $download_file ); } $is_site_administrator = is_multisite() ? current_user_can( 'manage_sites' ) : current_user_can( 'manage_options' ); $valid_storage_directory = $download_directories->is_valid_path( $download_file ); - /src/Internal/ProductDownloads/ApprovedDirectories/Synchronize.php line 229
* Controls whether shortcodes should be resolved and validated using the Approved Download Directory feature. * * @param bool $should_validate */ if ( apply_filters( 'woocommerce_product_downloads_approved_directory_validation_for_shortcodes', true ) && 'shortcode' === $downloadable->get_type_of_file_path() ) { $download_file = do_shortcode( $download_file ); } $parent_url = ( new URL( $download_file ) )->get_parent_url(); $this->register->add_approved_directory( $parent_url, false ); } catch ( Exception $e ) {