SOLVED: YITH Woocommerce Add-Ons conflict with Bricks Builder | Can't move elements yet on structure panel

Bricks Version: 1.4.0.2
Browser: Chrome 90
OS: macOS
URL: –

Hello lads,

Since yesterday, I can’t move On an element on the structure panel right side.
A little bit confusing for continue my website.
This bug appear both on Template Builder and Page Builder.

Regards

Edit : Big issue, I think there is a high problem with elements on builder.
I can’t align items to on the builder.
Any solution ?
Everything worked fine before

Edit 2 : I think I know from where the bug comes.
I deactivated " YITH WooCommerce Product Addons " and now it’s work fine.
But it’s so weird, this addon just add blocks for products on single product, but destroy my Page / Template builder.

  • I can’t stop to use this plugin for my project, any solution ?

Hello @Aurel

Thank you for your report and following updates.

It seems there is a conflict between YITH WooCommerce Product Addons and Bricks.

Is this still the case or meanwhile you found a workaround?

Paste this in your functions file and the problem will go away. Probably best to ask YITH to fix this in their plugins properly if they want full compatibility with bricks.

function dequeue_unnecessary_scripts() {

	if ( function_exists('bricks_is_builder_main') && bricks_is_builder_main() ) {
		wp_deregister_script( 'yith_wapo_front' );
		wp_deregister_script( 'yith_wapo_jquery-ui-timepicker' );
	}
}
add_action( 'wp_print_scripts', 'dequeue_unnecessary_scripts' );
2 Likes

Thank you @cmstew for the solution!

1 Like

No problem at all! :slightly_smiling_face: I just had a random thought here.

Do you think it would be possible for bricks to automatically dequeue all scripts in the builder? And maybe provide some sort of a filter for plugin developers to still be able to hook their scripts into the builder if they actually need to?

I think this would clear up a lot of incompatibilities if done right.

Hi

I received this from YITH that resolved the issue.

add_filter( ‘yith_wapo_enqueue_front_scripts’, ‘yith_wapo_enqueue_front_scripts_custom’, 999999 );

function yith_wapo_enqueue_front_scripts_custom( $value ) {
if ( isset( $_GET[‘bricks’] ) && ‘run’ === $_GET[‘bricks’] ){
$value = false;
}

return $value;

}