• Hi Dan,

    There is a conflict between Sprout Invoices and CiviCRM (http://www.civicrm.org). The conflict prevents drop-down menu options from appearing in the CiviCRM components when working in CiviCRM Administrator dashboard. To fix this, we have made the following modification to Sprout Invoices code:
    /public_html/wp-content/plugins/sprout-invoices/load.php
    Line 288:

    before :
    sprout_invoices_load();

    after :
    if(is_admin() && $_REQUEST[‘page’] == ‘CiviCRM’){

    }else{
    sprout_invoices_load();
    }

    Would you mind including this in core code?

    If you need to evaluate this on our installation, email me.

    https://wordpress.org/plugins/sprout-invoices/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Dan Cameron

    (@dancameron)

    What version of Sprout Invoices are you using? I ask because there shouldn’t be any drop-down conflicts in any of the most recent updates.

    Also, I wouldn’t be adding the modification you made, instead you should use a filter like the one below…

    function _unregister_resources() {
    	if( is_admin() && $_REQUEST['page'] == 'CiviCRM' ){
    		wp_dequeue_script( 'si_admin' );
    		wp_dequeue_script( 'dropdown' );
    		wp_dequeue_script( 'select2' );
    
    		wp_dequeue_style( 'sprout_invoice_admin_css' );
    		wp_dequeue_style( 'select2_css' );
    		wp_dequeue_style( 'dropdown' );
    	}
    }
    add_action( 'admin_enqueue_scripts', '_unregister_resources', 100 );

    If you can tell me which CSS or JS is causing the issue I could test the above code for you, since there’s a lot of assumptions in the above code.

    Thread Starter Interpolat Solutions

    (@jmdziba)

    I am on version 5.3 for Sprout. The drop-downs that fail to load are in CiviCRM, not Sprout. But issue only arose with installation of Sprout.

    Plugin Author Dan Cameron

    (@dancameron)

    Thank you for the info. Did you try the code I provided above?

    Thread Starter Interpolat Solutions

    (@jmdziba)

    Yes, have implemented the code in theme’s functions.php and it worked. Thanks again. Almost ready to go pro.

    Plugin Author Dan Cameron

    (@dancameron)

    Sweet.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conflict with CiviCRM’ is closed to new replies.