| @@ -84,9 +84,9 @@ | ||
| 84 | 84 | // Cleanup |
| 85 | 85 | $drive->cleanup( $name . $separator . '*' . $file_ext . '.zip', $fkp ); |
| 86 | 86 | } |
| 87 | 87 | // Remove ZIP file |
| 88 | - unlink( $zipfile ); | |
| 88 | + wp_delete_file( $zipfile ); | |
| 89 | 89 | self::mail( $eml, "Export {$name} successfully completed at " . gmdate( 'Y-m-d H:i:s' ) ); |
| 90 | 90 | } |
| 91 | 91 | } else { |
| 92 | 92 | fseek( $temporary_file, 0 ); |
| @@ -98,9 +98,11 @@ | ||
| 98 | 98 | } |
| 99 | 99 | self::mail( $eml, "Export {$name} successfully completed at " . gmdate( 'Y-m-d H:i:s' ) ); |
| 100 | 100 | } |
| 101 | 101 | // Remove temporary file |
| 102 | + // phpcs:disable WordPress.WP.AlternativeFunctions.file_system_operations_fclose | |
| 102 | 103 | fclose( $temporary_file ); |
| 104 | + // phpcs:enable WordPress.WP.AlternativeFunctions.file_system_operations_fclose | |
| 103 | 105 | } |
| 104 | 106 | } |
| 105 | 107 | } |
| 106 | 108 | } else { |