Automattic\WooCommerce\Internal\ProductFeed\Storage
JsonFileFeed::feed_file_path
Resolves a feed file's path from its identifier without creating the upload directory.
Unlike {@see get_upload_dir()} (used when writing), this must not create the directory as a side effect. Callers must validate the identifier with {@see is_valid_feed_identifier()} first.
Метод класса: JsonFileFeed{}
Хуков нет.
Возвращает
string. The absolute path to the feed file.
Использование
// private - только в коде основоного (родительского) класса $result = $this->feed_file_path( $identifier ): string;
- $identifier(строка) (обязательный)
- The feed file name.
Код JsonFileFeed::feed_file_path() JsonFileFeed::feed file path WC 11.2.2
private function feed_file_path( string $identifier ): string {
$upload_dir = wp_upload_dir( null, false );
return $upload_dir['basedir'] . DIRECTORY_SEPARATOR . self::UPLOAD_DIR . DIRECTORY_SEPARATOR . $identifier;
}