Don't initialize scripts if wc is not active
This commit is contained in:
parent
0e07f05d30
commit
ce6938548e
|
@ -43,6 +43,10 @@ function wgpb_register_products_block() {
|
|||
* Register extra scripts needed.
|
||||
*/
|
||||
function wgpb_extra_gutenberg_scripts() {
|
||||
if ( ! function_exists( 'wc_get_theme_support' ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
wp_enqueue_script(
|
||||
'react-transition-group',
|
||||
plugins_url( 'assets/js/vendor/react-transition-group.js', __FILE__ ),
|
||||
|
|
Loading…
Reference in New Issue