Support » Plugin: WC Fields Factory » Bug report (3.0.0): $ is not a function

  • Resolved protostack

    (@protostack)



    var $ = jQuery;
    				function wccpf_init_color_pickers_1() {}$(document).ready(function() {if( typeof $.spectrum != "undefined" ){if( typeof wccpf_init_color_pickers_1 != "undefined" ){wccpf_opt.color_picker_functions.push( "wccpf_init_color_pickers_1" );wccpf_init_color_pickers_1();}} });

    before if( typeof $.spectrum, $ was undefined. As a temporary fix I added a var $ = jQuery; just after the opening brace.

    in includes\wcff-injector.php I now have on line 645

    $color_picker_script .= '$(document).ready(function() {var $=jQuery;if( typeof $.spectrum != "undefined" ){';

    • This topic was modified 1 month, 3 weeks ago by  protostack.
    • This topic was modified 1 month, 3 weeks ago by  protostack.
    • This topic was modified 1 month, 3 weeks ago by  protostack.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi, just had this myself, in my case was line 644, replaced with the above

    $color_picker_script .= ‘$(document).ready(function() {var $=jQuery;if( typeof $.spectrum != “undefined” ){‘;

    Seems to have fix it, clearly the bug wasn’t tracked from the previous issue

    Thanks for this Protostack!

    Lee

    Spoke too soon, needs the old fix on line 181 too

    $field_rules_script = ‘<script> var $ = jQuery;
    $(document).ready(function(){
    var $=jQuery;
    $(document).on(“change”, “[data-has_field_rules=yes]”, function(){
    ‘;

    Plugin Author sarkparanjothi

    (@sarkparanjothi)

    please take update 3.0.1

    Plugin Author sarkparanjothi

    (@sarkparanjothi)

    please take update 3.0.2

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.