• Resolved dreamzspl

    (@dreamzspl)


    Hello,
    There seems to be an error in the console regarding “WAPF”. This issue is gone if I deactivate WP Asset Cleanup:
    “Uncaught ReferenceError: WAPF is not defined at (index):1678:211”

    <script defer='defer' type='text/javascript' id='wpacu-combined-js-body-group-1' src='https://pawmeal.com/wp-content/cache/asset-cleanup/js/body-9838a9f5966e96776b6c21b8c6ca05da783d2d27.js'></script>			<script>WAPF.Filter.add('wapf/pricing/base',function(price,data){if(WAPF.Util.currentProductType(data.parent)==='variable-subscription'){var v=WAPF.Util.getVariation(data.parent);if(v)
    price=v.display_price}
    return price})</script>
    

    Will really appreciate your advice. Thank you!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @dreamzspl it looks like the issue is fixed after you removed the “defer” attribute. In this case, “defer” is not good to have it applied on the SCRIPT tag, as “WAPF” is called BEFORE the combined script is loaded.

    One way to keep the “defer” (if you genuinely believe that it boosts your PageSpeed Insights score) is to exclude from the combined JS the file that loads “WAPF” which is the following: /wp-content/plugins/advanced-product-fields-for-woocommerce-pro/assets/js/frontend.min.js

    The inline JS content that is loaded after the combined JS should have been appended to the combined JS as well. For some reason, it isn’t, most likely due to the way it’s loaded, not having the same handle which is wapf-frontend.

Viewing 1 replies (of 1 total)
  • The topic ‘WAPF is not defined’ is closed to new replies.