PATH:
home
/
lab2454c
/
igpma.com
/
wp-content
/
plugins
/
mailchimp-for-wp
/
includes
/
admin
/
migrations
<?php defined( 'ABSPATH' ) or exit; $old_options = get_option( 'mc4wp_lite_checkbox', array() ); $pro_options = get_option( 'mc4wp_checkbox', array() ); if ( ! empty( $pro_options ) ) { $old_options = array_merge( $old_options, $pro_options ); } // do we have to do something? if ( empty( $old_options ) ) { return; } // find activated integrations (show_at_xxx options) $new_options = array(); $map = array( 'comment_form' => 'wp-comment-form', 'registration_form' => 'wp-registration-form', 'buddypress_form' => 'buddypress', 'bbpres_forms' => 'bbpress', 'woocommerce_checkout' => 'woocommerce', 'edd_checkout' => 'easy-digital-downloads', ); $option_keys = array( 'label', 'precheck', 'css', 'lists', 'double_optin', 'update_existing', 'replace_interests', 'send_welcome', ); foreach ( $map as $old_integration_slug => $new_integration_slug ) { // check if integration is enabled using its old slug $show_key = sprintf( 'show_at_%s', $old_integration_slug ); if ( empty( $old_options[ $show_key ] ) ) { continue; } $options = array( 'enabled' => 1, ); foreach ( $option_keys as $option_key ) { if ( isset( $old_options[ $option_key ] ) ) { $options[ $option_key ] = $old_options[ $option_key ]; } } // add to new options $new_options[ $new_integration_slug ] = $options; } // save new settings update_option( 'mc4wp_integrations', $new_options ); // delete old options delete_option( 'mc4wp_lite_checkbox' ); delete_option( 'mc4wp_checkbox' );
[-] 3.0.0-form-3-messages.php
[edit]
[-] 4.1.3-reschedule-event.php
[edit]
[+]
..
[-] 3.0.0-integration-options.php
[edit]
[-] 4.0.0-hidden-fields-value-delimiter.php
[edit]
[-] 4.1.2-flush-list-cache.php
[edit]
[-] 3.0.0-general-options.php
[edit]
[-] 4.8.2-move-debug-log-to-subdirectory.php
[edit]
[-] 3.0.0-form-1-post-type.php
[edit]
[-] 3.1.6-woocommerce-position-prefix.php
[edit]
[-] 4.0.0-groupings-to-interests.php
[edit]
[-] 3.0.0-styles-builder.php
[edit]
[-] 3.0.3-usage-tracking-schedule.php
[edit]
[-] 3.0.0-widget-base-id.php
[edit]
[-] 3.0.0-form-2-options.php
[edit]
[-] 4.0.7-rename-debug-log-file.php
[edit]
[-] 4.6.0-remove-lists-from-options.php
[edit]