wordpress , problems with text blocks, they dissapear

I’m a beginner in wordpress, recently I installed the dokan plugin for my online shop, gave me problems and I read that the solution was add this code

add_action(‘wp_enqueue_scripts’, ‘mgt_dequeue_stylesandscripts’,99);

function mgt_dequeue_stylesandscripts() {
if ( class_exists( ‘woocommerce’ ) ) {
wp_dequeue_style( ‘select2’ );
wp_deregister_style( ‘select2’ );

wp_dequeue_script( ‘select2’);

** } }**

I am using the handy store template, so I put the code in the file “function”, when I use this function, the text-blocks stop working, literally they disappear, and when I remove the code they come back again, how could I solve it?

the above problem was that I had errors when uploading banners and photos.

Visit here for webpage: Website

It’s better to contact the author for free support but in some cases, they couldn’t provide free support.
At this point, if you’f prefer you can purchase my service