Making WordPress.org


Ignore:
Timestamp:
02/22/2024 05:30:26 AM (21 months ago)
Author:
dd32
Message:

Plugin Directory: Store errors encountered during the plugin import process.

See #6921, #6108.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/jobs/class-plugin-import.php

    r12606 r13234  
    4444        $revision     = max( (array) $plugin_data['revisions'] );
    4545
     46        $importer = new CLI\Import();
    4647        try {
    47             $importer = new CLI\Import();
    4848            $importer->import_from_svn( $plugin_slug, $tags_touched, $revision );
    4949        } catch ( Exception $e ) {
    5050            fwrite( STDERR, "[{$plugin_slug}] Plugin Import Failed: " . $e->getMessage() . "\n" );
     51        } finally {
     52            if ( $importer->plugin ) {
     53                update_post_meta( $importer->plugin->ID, '_last_import', time() );
     54                update_post_meta( $importer->plugin->ID, '_import_warnings', $importer->warnings );
     55            }
    5156        }
    5257
Note: See TracChangeset for help on using the changeset viewer.