• Hi,

    We have a small problem with the last wordpress version (5.7) and your plugin. It seems you have a wrong call on this file /wp-multisite-content-copier/wp-multisite-content-copier.php at line 57 :

    if ( ! function_exists( 'WMCC_admin_include_css_and_js' ) ) {
        add_action( 'admin_enqueue_scripts', 'WMCC_admin_include_css_and_js' );
        function WMCC_admin_include_css_and_js() {
            
            wp_register_style( 'wmcc-style', plugin_dir_url( __FILE__ ) . 'assets/css/wmcc-style.css', false, '1.0.0' );
            wp_enqueue_style( 'wmcc-style' );
            
            wp_register_script( 'wmcc-script', plugin_dir_url( __FILE__ ) . 'assets/js/wmcc-script.js', array( 'jquery' ) );
            wp_localize_script( 'wmcc-script', 'wmcc_ajaxurl', admin_url( '/admin-ajax.php' ) );
            wp_enqueue_script( 'wmcc-script' );
        }
    }

    Have a nice day,

    Max

Viewing 1 replies (of 1 total)
  • The same issue here.

    Had to update wp-multisite-content-copier/wp-multisite-content-copier.php line 57
    From:
    wp_localize_script( 'wmcc-script', 'wmcc_ajaxurl', admin_url( '/admin-ajax.php' ) );
    To:
    wp_localize_script( 'wmcc-script', 'wmcc_ajaxurl', array( 'url' => admin_url( 'admin-ajax.php' ) ) );

    And wp-multisite-content-copier/assets/js/wmcc-script.js line 11
    From:
    $.post( wmcc_ajaxurl, show_cc_data, function( response ) {
    To:
    $.post( wmcc_ajaxurl.url, show_cc_data, function( response ) {

    And line 47
    From:
    $.post( wmcc_ajaxurl, send_cc_data, function( response ) {
    To:
    $.post( wmcc_ajaxurl.url, send_cc_data, function( response ) {

    • This reply was modified 3 years, 5 months ago by RubenMartins.
Viewing 1 replies (of 1 total)
  • The topic ‘wrong call for WP_Scripts::localize’ is closed to new replies.