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.

{} Это метод класса: Synchronize{}

Хуков нет.

Возвращает

null. Ничего.

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

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

Код Synchronize::add_default_directories() WC 6.8.0

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' );
}