Home / Forums / WoodMart support forum / swiper is not defined error in console
Home › Forums › WoodMart support forum › swiper is not defined error in console
swiper is not defined error in console
- This topic has 8 replies, 2 voices, and was last updated 4 months, 2 weeks ago by
Artem Temos.
-
AuthorPosts
-
February 19, 2026 at 5:28 pm #709270
thomas-8605ParticipantHello,
we have this error in browser debug console:
wiper is not defined swiperInit.min.js:1:1203Based on this error the lightbox is not working correct. Check also attached screenshot.
We contact the support of crocoblock and they showing us: Its working perfect with hello theme and with xstore theme.If we switch to woodmart the problem is showing again in browser console and lightbox is not working correct.
We only activate crocoblock in latest version and woodmart core plugins.We can see in your forum a lot of users had this issue in the end of last year and you patched this issue.
Please check that issue and try to fix it again.Attachments:
You must be logged in to view attached files.February 19, 2026 at 5:33 pm #709272Hello,
As we can see, you have purposely disabled the Swiper JS library on your website in Theme Settings -> Performance -> JS https://gyazo.com/3f2aaabb7e5ec19d54c375e59af1dab4
Try to return it to be loaded “On demand” and that should solve the JS error in the console.Kind Regards
February 19, 2026 at 6:01 pm #709273
thomas-8605ParticipantHello,
we disabled in general now the option ” Advanced scripts controls “.
But its still not working. We also test the option ALWAYS load… still not working.
Its only working if we switch to xstore, storefront or hello theme.February 19, 2026 at 6:59 pm #709276As we can see, it is not related to our scripts at all. WoodMart has its own version of the product gallery, which replaces WooCommerce’s default one. And because of this, we intentionally remove WooCommerce JS files for performance optimization. As this plugin relies on these libraries, you need to return them to your website. To do this, add the following code snippet to the
functions.phpfile in your child themeadd_action( 'wp_enqueue_scripts', function () { wp_enqueue_script( 'photoswipe-ui-default' ); wp_register_script( 'zoom', plugins_url( 'assets/js/zoom/jquery.zoom.min.js', WC_PLUGIN_FILE ), array(), defined( 'WC_VERSION' ) ? WC_VERSION : '1.0.0', array( 'in_footer' => true ) ); wp_enqueue_script( 'zoom' ); }, 3000 );February 19, 2026 at 7:09 pm #709279
thomas-8605ParticipantHello,
– We can see exact the same error was in end of 2025 in support forum and you fixing it by a patch.
Do you plan to fix this issue with a patch in next update?– We talked to crocoblock already and they told us: This shoud not handled like this by your theme. This is not only a script for woocommerce products, you also can use it in a simple elementor page or blog post and it shoud work out of the box. Any chance to get it working without this extra snippet like in xstore?
– In woodmart version 8.3.8 its working great without any custom snippet. That means: you changed the code in the last theme update, correct?
We need to know that because we can not continoue pay for next woodmart themes if that is an consisent issue and we have to handle all projects in that case with custom snippets.
February 19, 2026 at 7:14 pm #709280
thomas-8605Participantand the next problem is:
by doing this you break with a lot of plugins from crocoblock, they have +900.000 active websites with this plugin.Next problem:
– We have added your snippet to functions.php.
– We have enabled the arrows via elementor gallery widget.
But the arrows are not shown in the lightbox.
If we switch to another theme the arrows are shown in the lightbox without any issue.-
This reply was modified 4 months, 2 weeks ago by
thomas-8605.
-
This reply was modified 4 months, 2 weeks ago by
thomas-8605.
February 20, 2026 at 9:47 am #709324Hello,
As for now, Crocoblock plugins are not officially compatible with WoodMart. But we are going to integrate these plugins and add full compatibility in the future. As for now, you need to keep this code as a workaround.
To fix the issue with arrows, please use the following custom CSS code. You can add it to the Custom CSS area in Theme Settings
.pswp__button--arrow--left, .pswp__button--arrow--right { position: absolute!important; }Kind Regards
February 20, 2026 at 9:56 am #709329
thomas-8605ParticipantHello,
we have added
.pswp__button–arrow–left, .pswp__button–arrow–right {
position: absolute!important;
}to general custom css section and cleaned the rowser cache and elementor cache.
But the arrows are still not shown in mobile view in lightbox.BR
TommyFebruary 20, 2026 at 10:51 am #709335Hello,
It seems that it is how the plugin works. Please test how it works with the default theme and send us a screenshot so we can see the difference.
Kind Regards
-
This reply was modified 4 months, 2 weeks ago by
-
AuthorPosts
- You must be logged in to create new topics. Login / Register