Hi @maginem ,
Glad you reached out! Happy to help.
Recently, we’ve received some reports regarding Divi’s theme builder conflicting with GiveWP. Our developers are currently looking at this. You can follow the bug report that we’ve created in here — https://givewp.featureos.app/p/givewp-4-0-breaks-divi-s-theme-builder.
I don’t have a timeline for it, but I’ve added this ticket into the report to give it a boost. You can use the link to check in for updates or provide details of your own.
For now, you can use this code snippet as a workaround:
add_action( 'wp_print_scripts', 'dequeue_givewp_campaigns_script', 100 );
function dequeue_givewp_campaigns_script( $hook ) {
if ( isset( $_GET['page'] ) && 'et_theme_builder' === $_GET['page'] ) {
// Dequeue the plugin's script
wp_dequeue_script( 'givewp-campaign-entity' );
wp_deregister_script( 'givewp-campaign-entity' );
wp_dequeue_script( 'givewp-form-entity' );
wp_deregister_script( 'givewp-form-entity' );
wp_dequeue_script( 'orphaned-forms-list-table' );
wp_deregister_script( 'orphaned-forms-list-table' );
wp_dequeue_script( 'give-p2p-script-backend' );
wp_deregister_script( 'give-p2p-script-backend' );
}
}
If you need assistance implementing custom PHP code on your website, we have this guide: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/
Please note that this code snippet is provided as an example of how you can extend GiveWP with code. It’s up to you to implement and customize to your liking. We cannot provide support for custom code on your website, only the code that we create and distribute.
Before taking any steps for troubleshooting or updating, I highly recommend taking a good backup of the site you can confidently restore from. Having a backup of your site is essential to a solid workflow, and will allow you to restore to a previous version of the site if you run into any issues. You can read more about our top recommendations for taking a backup here: https://givewp.com/backup-for-faster-troubleshooting/.
Please let me know once you implemented and tested the above.
Meanwhile, I’m here for further questions or additional assistance.
Have a lovely day!
Hi, have tried this on both my staging and live sites with no luck 🙁 .
Ok just got it to work. Had a look at the errors, and saw that there was still a script running donorEntity.js. So I updated the PHP snippet and now the Theme Builder is working again!
I added in these two lines:
wp_dequeue_script( ‘givewp-donor-entity’ );
wp_deregister_script( ‘givewp-donor-entity’ );
add_action( 'wp_print_scripts', 'dequeue_givewp_campaigns_script', 100 );
function dequeue_givewp_campaigns_script( $hook ) {
if ( isset( $_GET['page'] ) && 'et_theme_builder' === $_GET['page'] ) {
// Dequeue the plugin's script
wp_dequeue_script( 'givewp-campaign-entity' );
wp_deregister_script( 'givewp-campaign-entity' );
wp_dequeue_script( 'givewp-donor-entity' );
wp_deregister_script( 'givewp-donor-entity' );
wp_dequeue_script( 'givewp-form-entity' );
wp_deregister_script( 'givewp-form-entity' );
wp_dequeue_script( 'orphaned-forms-list-table' );
wp_deregister_script( 'orphaned-forms-list-table' );
wp_dequeue_script( 'give-p2p-script-backend' );
wp_deregister_script( 'give-p2p-script-backend' );
}
}