PHP Fatal error: Uncaught Error: Call to undefined function wp_underscore_audio_template() in /wordpress/core/4.8/wp-includes/widgets/class-wp-widget-media-audio.php:201
Stack trace:
#0 /floorcaresupplies/wp-content/plugins/siteorigin-panels/inc/admin.php(785): WP_Widget_Media_Audio->render_control_template_scripts()
#1 /wordpress/core/4.8/wp-includes/class-wp-hook.php(298): SiteOrigin_Panels_Admin->js_widget_templates('')
#2 /wordpress/core/4.8/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters('', Array)
#3 /wordpress/core/4.8/wp-includes/plugin.php(453): WP_Hook->do_action(Array)
#4 /wordpress/core/4.8/wp-admin/admin-footer.php(99): do_action('admin_footer-po...')
#5 /wordpress/core/4.8/wp-admin/post.php(292): include('/wordpress/core...')
#6 {main}
thrown in /wordpress/core/4.8/wp-includes/widgets/class-wp-widget-media-audio.php on line 201
Would anyone know how to solve this error? i keep receiving it when activating the Site origin page builder plugin and if i click on anything when going to orders within woocommerce
It appears to be in the following lines of code that the error occurs once commented out it functions correctly
/**
* Need to render templates for new WP 4.8 widgets when not on the 'widgets' screen or in the customizer.
*/
function js_widget_templates() {
$screen = get_current_screen();
if ( $screen->base != 'widgets' ) {
global $wp_widget_factory;
foreach ( $wp_widget_factory->widgets as $class => $widget_obj ) {
if ( method_exists( $widget_obj, 'render_control_template_scripts' ) ) {
$widget_obj->render_control_template_scripts();
}
}
}
}