woocommerce_product_downloads_approved_directory_validation_for_shortcodes
woocommerce_product_downloads_approved_directory_validation_for_shortcodes
Appears in: woocommerce.6.6.1, woocommerce.6.7.0, woocommerce.6.8.0, woocommerce.6.8.1, woocommerce.6.8.2, woocommerce.6.9.0, woocommerce.6.9.4, woocommerce.7.0.0, woocommerce.7.1.0, woocommerce.7.1.1, woocommerce.7.2.2, woocommerce.7.3.0, woocommerce.7.4.0, woocommerce.7.4.1, woocommerce.7.5.1, woocommerce.7.6.0, woocommerce.7.6.1, woocommerce.7.7.0, woocommerce.7.7.1, woocommerce.7.8.1, woocommerce.7.9.0, woocommerce.8.0.2, woocommerce.8.0.3, woocommerce.8.1.1, woocommerce.8.2.1, woocommerce.8.2.2, woocommerce.8.3.1, woocommerce.8.4.0, woocommerce.8.5.1, woocommerce.8.5.2, woocommerce.8.6.0, woocommerce.8.6.1, woocommerce.8.7.0, woocommerce.8.8.3, woocommerce.8.9.2, woocommerce.8.9.3, woocommerce.9.0.2, woocommerce.9.1.2, woocommerce.9.1.4, woocommerce.9.2.2, woocommerce.9.2.3, woocommerce.9.3.1, woocommerce.9.3.3, woocommerce.9.4.2, woocommerce.9.4.3, woocommerce.9.5.1
Hook Type: filter
Displaying hooks found in version: woocommerce.9.5.1apply_filters('woocommerce_product_downloads_approved_directory_validation_for_shortcodes') is found 2 times:
- /includes/class-wc-product-download.php line 216
* 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 ) {