• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

RESOLVED Plugin tech support code not working (works in Code Snippets)

douga

New member
Messages
2
Likes
0
Points
1
#1
I ran into an issue with Expandable Rows for Beaverbuilder by Brainstorm Force. There tech support provided the following code:

"
We have fixed this issue on your end. You will have to add the following custom code in the functions.php file of your child theme.

We have tried this code on your site and it is resolving the issue on your end.

We would recommend adding this code in the child theme inside the functions.php file.

add_action( 'init', 'load_css_file', 10, 1 );

function load_css_file() {
if ( class_exists( 'FLBuilder' ) && class_exists( 'BSFBBERRow' ) ) {
wp_enqueue_style( 'foundation_icon', BB_ER_ROW_URL . 'expandable-row/fonts/foundation-icons/foundation-icons.css', array() );
}
}
"

I added it as a snippet

1559706326030.png

1559706366958.png



It did not work as expected. I reached back to the plugin support asking them to double check it, and they repsonded:
"We have tried on our end. We have noticed that init hooks can't be run in Woody ad snippets plugin. We have tried using Code Snippets plugins and working correctly."

Can you pls help me here?
 

Temyk

Developer & Support
Messages
1,129
Likes
42
Points
48
#2
Hello,

We found a bug in our plugin. We will fix it in the next update, but you can fix it yourself now. Replace the lines in the file
wp-content\plugins\insert-php\includes\class.execute.snippet.php
from
35: add_action( 'wp', array( $this, 'executeEverywhereSnippets' ), 1 );
to
35: add_action( 'plugins_loaded', array( $this, 'executeEverywhereSnippets' ), 1 );

Let us know if this solved the problem.