| @@ -1586,12 +1586,8 @@ | ||
| 1586 | 1586 | // Save the image in the uploads directory. |
| 1587 | 1587 | require_once ABSPATH . '/wp-admin/includes/file.php'; |
| 1588 | 1588 | \WP_Filesystem(); |
| 1589 | 1589 | global $wp_filesystem; |
| 1590 | - if ( ! is_a( $wp_filesystem, 'WP_Filesystem_Base' ) ) { | |
| 1591 | - $creds = request_filesystem_credentials( site_url() ); | |
| 1592 | - wp_filesystem( $creds ); | |
| 1593 | - } | |
| 1594 | 1590 | $upload_file = $wp_filesystem->put_contents( $upload_path . $hashed_filename, $decoded ); |
| 1595 | 1591 | |
| 1596 | 1592 | // Insert new chart image. |
| 1597 | 1593 | $attachment = array( |