Support » Plugin: WC Fields Factory » WooCommerce images not showing after latest update
WooCommerce images not showing after latest update
-
Hi,
After yesterday’s update, the woocommerce images are not showing on the single product page. I deactivated the plugin and then the images are showing.PLease look into this plugin conflict with WooCommerce
-
I have checked everything working for me.
Can you post woocommerce version and php error log about wcff.I’m getting the same issue.
(index):392 Uncaught TypeError: $ is not a function
Error is occurring in this block<script> var $ = jQuery;
$(document).ready(function(){
// Error occurs on the next line
$(document).on(“change”, “[data-has_field_rules=yes]”, function(){
});
});
</script>I believe you want
<script> var $ = jQuery;
$(document).ready(function(){
var $ = jQuery;
$(document).on(“change”, “[data-has_field_rules=yes]”, function(){
});
});
</script>+1. Woocommerce product images not working and the virtual products selection is not working either after the last update (2.0.8)
WC: 3.3.5
WP: 4.9.5I’m also having the same issue.
WC : 3.3.5 and
WP : 4.9.6.I believe it’s a jQuery conflit. I noticed the Quantity button were also not working properly. When disabling the display of the custom fields from WC Field Factory, everything (quantity buttons and image included) loads and works fine.
So following @protostack’s suggestion (thanks!), I edited the wp-content/plugins/wc-fields-factory/includes/wcff-injector.php file, on line 142 and added the “var $ = jQuery;” declaration inside the ready function.
It works now, but hopefully the next update won’t crush this fix!
Thanks @protostack
This hotfix works perfect. Wasted lot of time before I found this postHi, I’ve just come across this issue, the fix above doesn’t look like it works now? Or at least the file has changed and I’m not putting it in the right place!?
Anyone else?
Lee
-
This reply was modified 4 years, 5 months ago by
lees69.
Found Protostacks new update replacing line 644 (in my case) with
$color_picker_script .= ‘$(document).ready(function() {var $=jQuery;if( typeof $.spectrum != “undefined” ){‘;
Just for anyone else that comes across this, credit to Protostack
Lee
@sarkparanjothi Please, update and fix this issue. I can’t watch over my client’s website every time I update this plugin and having to charge fee for my time I have to spend editing the plugin’s source code!
To summerize :
You still need to edit wp-content/plugins/wc-fields-factory/includes/wcff-injector.php file, on line 182 (no longer 142) and add the “var $ = jQuery;” declaration inside the ready(function()). For simplicity’s sake, I parsed the tabulation for display here…$(document).ready(function(){ var $ = jQuery; $(document).on("change", "[data-has_field_rules=yes]", function(){
Then you also need to edit the same file at line 645 with @leeshields addition to the fix and replace
$color_picker_script .= '$(document).ready(function() {if( typeof $.spectrum != "undefined" ){';
with :
$color_picker_script .= '$(document).ready(function() {var $=jQuery;if( typeof $.spectrum != “undefined” ){';
Hi,
I have the same problem. I edited the file wcff-injector.php, unfortunately, it not work for me. Any idea?
Thank you!I have the same issue but I don’t have wc-fields-factory folder, I also searched for the wcff-injector.php it couldn’t be found in my website folder anywhere??!!
Any ideas anyone
Let’s wrap this in an enclosure where ever used.
(function($){ $(document).ready(function(){ $(document).on("change", "[data-has_field_rules=yes]", function(){ ... }); }); )(jQuery);
Good point there @wordninja. Didn’t cause conflict in my setup but never too cautious!
-
This reply was modified 4 years, 5 months ago by
- The topic ‘WooCommerce images not showing after latest update’ is closed to new replies.