Line 94 in pardot.php causing error since recent update (2.0.0)
-
Hi! I just updated to Pardot 2.0.0 and my local debug logs started filling with notices and I was running into issues saving posts. I traced it to the Pardot plugin: line 94 in pardot.php is causing an error to be thrown because the third parameter needs to be an array. I was able to resolve the error by simply wrapping the third parameter in array(), but this is obviously just a temporary bandaid.
I logged into Pardot to contact support, but my seat doesn’t have access to support, so I’m hoping posting here will do the trick.
PROBLEM: wp_localize_script( ‘build/index.js’, ‘ajaxurl’, admin_url( ‘includes/admin-ajax.php’ ));
ERROR: Function WP_Scripts::localize was called <strong>incorrectly</strong>. The <code>$l10n</code> parameter must be an array.
SOLUTION: wp_localize_script( ‘build/index.js’, ‘ajaxurl’, array(admin_url( ‘includes/admin-ajax.php’ )));
Thanks for your help!
- The topic ‘Line 94 in pardot.php causing error since recent update (2.0.0)’ is closed to new replies.