• I am the developer of plugin wp-photo-album-plus
    One of the (admin) features is to import/export media item metadata in the form of .csv files.
    I use the php functions str_getcsv() and fputcsv().
    To use fputcsv() a file must be opend by fopen(), and afterwards closed by fclose(). I also use fwrite() for the header line of the .csv file.

    However, plugin check reports the following errors:

    ERROR WordPress.WP.AlternativeFunctions.file_system_operations_fopen File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fopen().
    ERROR WordPress.WP.AlternativeFunctions.file_system_operations_fclose File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fclose().
    ERROR WordPress.WP.AlternativeFunctions.file_system_operations_fwrite File operations should use WP_Filesystem methods instead of direct PHP filesystem calls. Found: fwrite().

    And these functions do not exist in WP_Filesystem_Direct.

    So, any idea how to fix this?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.