• Resolved Daniel Chase

    (@riseofweb)


    Thank you for spending the time to develop this useful plugin!

    In the plugin, you have the option to not load the CSS of the date picker and time picker. However, you don’t have the option to not load the JavaScript files.

    I have the CSS disabled for both of those and that is great! But why isn’t there an option to not load its JavaScript as well?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support oluisrael

    (@oluisrael)

    Hello @riseofweb, thank you for using our plugin.

    Just for the sake of clarification, can you let me know the option you are referring to? You can share screenshots with me.

    Thread Starter Daniel Chase

    (@riseofweb)

    Here is a local path of the settings page where these settings are located:
    /wp-admin/admin.php?page=wc-settings&tab=alg_wc_pif
    The options I am referring to are “Load Timepicker Style” and “Load Datepicker Style.”

    A screenshot can be viewed here:
    https://drive.google.com/file/d/1vEG9KeHV36kxxQlESU7iqKw24GEdqqP2/view?usp=sharing

    Ideally, users would want options to disable the unused JavaScript as well.

    Plugin Support oluisrael

    (@oluisrael)

    @riseofweb, my apologies for the delay in getting back to you on this. That option is for JavaScript as well. I’d also like to point out that we use JavaScript to show the pricing tables.

    Thread Starter Daniel Chase

    (@riseofweb)

    I have the options “Load Timepicker Style” and “Load Datepicker Style” unchecked in the admin.

    Viewing the page source (HTML), I can see that the javascript is still loading for the time and date pickers.

    <script type='text/javascript' src='.../wp-content/plugins/product-input-fields-for-woocommerce/includes/js/alg-datepicker.js?ver=1.3.1' id='alg-datepicker-js'></script>
    <script type='text/javascript' src='.../wp-content/plugins/product-input-fields-for-woocommerce/includes/js/alg-weekpicker.js?ver=1.3.1' id='alg-weekpicker-js'></script>
    <script type='text/javascript' src='.../wp-content/plugins/product-input-fields-for-woocommerce/includes/js/jquery.timepicker.min.js?ver=1.3.1' id='jquery-ui-timepicker-js'></script>
    <script type='text/javascript' src='.../wp-content/plugins/product-input-fields-for-woocommerce/includes/js/alg-timepicker.js?ver=1.3.1' id='alg-timepicker-js'></script>
    <script type='text/javascript' src='.../wp-content/plugins/product-input-fields-for-woocommerce/includes/js/alg-wc-product-input-fields.js?ver=1.3.1' id='alg-wc-product-input-fields-js'></script>
    Plugin Support oluisrael

    (@oluisrael)

    @riseofweb, that’s strange. The script shouldn’t be present if the option is unchecked and he is not using time picker, date picker, or week picker. So can you confirm if you’re not using either the date picker, time picker, or week picker?

    Thread Starter Daniel Chase

    (@riseofweb)

    Oluisrael,

    I am using 1 input field and it is plain text.

    Thanks.

    Plugin Support oluisrael

    (@oluisrael)

    Hello @riseofweb, this is to let you know that we’re already fixing this issue you pointed out. I’ll share the solution with you once it is ready.
    Kindly bear with us.

    Thread Starter Daniel Chase

    (@riseofweb)

    Thanks.

    Plugin Support oluisrael

    (@oluisrael)

    Hello @riseofweb, the patch for this is ready, and you can download the patch file from here https://www.dropbox.com/s/tyigjn7s6ptmdnx/class-alg-wc-pif-core.php?dl=0.
    File name: class-alg-wc-pif-core
    File path: wp-content\plugins\product-input-fields-for-woocommerce\includes

    Thread Starter Daniel Chase

    (@riseofweb)

    I have used your file and it fixes the issue. Thank you, @oluisrael.

    Plugin Support oluisrael

    (@oluisrael)

    @riseofweb Thank you for the feedback. I’m happy I could be of help. I’ll proceed to mark this thread as resolved.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Date Picker and Time Picker JavaScript Loading’ is closed to new replies.