Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Elena Chavdarova

    (@elenachavdarova)

    Hello @roberthemsing,

    Usually all combined files should be listed in the exclude list. In case a script is not listed – this is most probably due to a custom coding.

    For that propose we have created a filter. You can find it in the readme.txt file. I have checked your case in details and the script handlers you need to exlude are:

    sv_wc_payment_form_valid_payment_data
    sv_wc_payment_form_handler_init

    The exact rules which can be set in your theme functions.php file are:

    add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );
    function js_combine_exclude( $exclude_list ) {
    	$exclude_list[] = 'sv_wc_payment_form_valid_payment_data';
    	$exclude_list[] = 'sv_wc_payment_form_handler_init';
    
    	return $exclude_list;
    }

    This way the file will be excluded from the combination and CC fields will work as expected.

    Best Regards,
    Elena

    Thread Starter Rosso Digital

    (@roberthemsing)

    Hi Elena,

    Tried adding that code but it came back with: syntax error, unexpected ‘&’

    The error shows as appearing in the line:

    add_filter( 'sgo_javascript_combine_exclude', 'js_combine_exclude' );

    Regards,
    Rob

    Plugin Author Elena Chavdarova

    (@elenachavdarova)

    Make sure you are adding the code to your website theme functions.php file. It can be added at the end of it.

    There is no & symbol present on the code I provided. Additional symbols can be listed due to difference in OS while copying and pasting the code. Just remove any custom characters and compare the code I listed with the one you are saving. If there are no additional symbols included, the filter should not return any errors and work normally.

    Best Regards,
    Elena

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘JavaScript Combination Breaks WooCommerce Square Checkout’ is closed to new replies.