Allow filtering template directories to avoid searching upload directory
-
I am trying to disable scanning the uploads directory for currency switcher templates.
Why?
uploads directly is linked to s3 and access is slow.
The method that selects the folders to scan is “init_available_templates()” in “inc/currencies/currency-switcher/class-wcml-currency-switcher-templates.php”You are already providing a filter before some default folders (including the upload dir) are added:
$dirs_to_scan = apply_filters( ‘wcml_cs_directories_to_scan’, $dirs_to_scan );If this filter would be called after the default had been added I could remove the upload directory using this filter
Any chance of moving this filter down a few lines or adding another one after the array has been filled with the defaults?So far I have found no other way than manually patching the class, which is not a long term option.
- The topic ‘Allow filtering template directories to avoid searching upload directory’ is closed to new replies.