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. Ничего (null).

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

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

Код Synchronize::add_default_directories() WC 8.9.3

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