HomePage Forums Plugins Support Drop Uploader – WooCommerce Version Custom uploader validation

This topic contains 2 replies, has 2 voices, and was last updated by  borisolhor 2 weeks, 2 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1406

    Hi, I’m manually outputting the uploader in the checkout only if there is a certain product there.

    In the admin settings “Show on Checkout Page” is disabled (because I manually echo the form) and “Required on Checkout Page” is set to “Yes”. However, in this case, in checkouts where there is no uploader the system still says it is a required field.

    If I set “Required on Checkout Page” to “No”, how do I manually run validation in those cases where its needed? I understand that it has to be like this:

    add_action(‘woocommerce_checkout_process’, ‘check_uploader’);
    function check_uploader() {
    if(conditions go here) {
    ~~~what I have to insert here to run uploader validation?~~~
    }
    }

    Many thanks.

    • This topic was modified 3 weeks ago by  asdf.
    #1410

    Anyone?

    #1412

    Hi!
    Sorry for delay.
    You can manually check, is files fields is not empty after page submit. Please note, that there is used hidden input field, that contain file id, because file uploading via AJAX.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.