Skip to content

After plugin update add bdroppy_id on products and variants #1

Description

@avalla

Insert a meta field in products and in variants with a reference to bdroppy product or variant, create data from mapping table

See this reference

function my_plugins_update_completed( $upgrader_object, $options ) {

    // If an update has taken place and the updated type is plugins and the plugins element exists
    if ( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {
        foreach( $options['plugins'] as $plugin ) {
            // Check to ensure it's my plugin
            if( $plugin == plugin_basename( __FILE__ ) ) {
                // do stuff here
            }
        }
    }
}
add_action( 'upgrader_process_complete', 'my_plugins_update_completed', 10, 2 );

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions