Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Programmer095/f16cf413742fe12840b29d580e064693 to your computer and use it in GitHub Desktop.
Save Programmer095/f16cf413742fe12840b29d580e064693 to your computer and use it in GitHub Desktop.
Agile Store Locator Fix for Conflict with WP All Import

The code below goes in something like https://wordpress.org/plugins/code-snippets/ or your theme's functions.php file:

function soflyy_dequeue_agile_locator_script() { 
  if(class_exists ('AgileStoreLocator')){ 
    $core = new AgileStoreLocator(); 
    $name = $core->get_AgileStoreLocator() . '-lib'; 
    wp_dequeue_script( $name ); 
    }}
    
if($_GET['page'] == 'pmxe-admin-export' || $_GET['page'] == 'pmxi-admin-import'){ 
  add_action( 'wp_print_scripts', 'soflyy_dequeue_agile_locator_script', 100 );
}

(Important note: this is only example code that's provided in the hope that it helps. We can't troubleshoot/adjust this code for you.)

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