Automattic\WooCommerce\Internal\ProductDownloads\ApprovedDirectories

Synchronize::add_default_directories()publicWC 1.0

By default we add the woocommerce_uploads directory (file path plus web URL) to the list of approved download directories.

Method of the class: Synchronize{}

No Hooks.

Return

null. Nothing.

Usage

$Synchronize = new Synchronize();
$Synchronize->add_default_directories();

Synchronize::add_default_directories() code WC 7.1.1

public function add_default_directories() {
	$upload_dir = wp_get_upload_dir();
	$this->register->add_approved_directory( $upload_dir['basedir'] . '/woocommerce_uploads' );
	$this->register->add_approved_directory( $upload_dir['baseurl'] . '/woocommerce_uploads' );
}