Support » Plugin: WooCommerce Hear About Us » Dropdown visible only for users NOT logged in

  • Hi

    Today we got an order from an existing user and there was no data re ‘How did you hear about us?’. I checked it and the field is only there when the user is NOT logged in. Is there a way to link the field to an order as opposed to a user? Thanks.

    User logged in and field NOT visible
    =========================================
    <div class=”woocommerce-shipping-fields”>
    </div>
    <div class=”woocommerce-additional-fields”>
    <h3>Additional information</h3>
    <div class=”woocommerce-additional-fields__field-wrapper”>
    </div>
    </div>
    </div>
    </div>
    <h3 id=”order_review_heading”>Your order</h3>
    =========================================

    User NOT logged in and field visible
    =========================================
    <div class=”woocommerce-shipping-fields”>
    </div>
    <div class=”woocommerce-additional-fields”>
    <h3>Additional information</h3>
    <div class=”woocommerce-additional-fields__field-wrapper”>
    </div>
    <p class=”form-row wchau-source form-row-wide validate-required” id=”wchau_source_field” data-priority=””><label for=”wchau_source” class=””>Where did you hear about us? <abbr class=”required” title=”required”>*</abbr></label><select name=”wchau_source” id=”wchau_source” class=”select ” data-placeholder=””>
    <option value=”empty”>– Choose an option –</option><option value=”college-advertising”>College advertising
    </option><option value=”facebook”>Facebook
    </option><option value=”google”>Google
    </option><option value=”referral-from-colleague”>Referral from colleague
    </option><option value=”twitter”>Twitter
    </option><option value=”other”>Other</option>
    </select></p><p class=”form-row validate-required” id=”wchau_source_field” data-priority=””><label for=”wchau_source” class=””>Other <abbr class=”required” title=”required”>*</abbr></label><input type=”text” class=”input-text ” name=”wchau_source” id=”wchau_source” placeholder=”” value=””/></p></div>
    </div>
    </div>
    <h3 id=”order_review_heading”>Your order</h3>

Viewing 1 replies (of 1 total)
  • Hey,

    Actually, the field only shows if the user hasn’t already answered the question. Doesn’t make much sense to ask them twice I don’t think (though I don’t know your exact use-case).

    Right now there isn’t a way to change this without editing the plugin files directly – maybe the author can add a filter to turn this on/off if needed.

    • This reply was modified 4 years, 3 months ago by willgorham.
Viewing 1 replies (of 1 total)
  • The topic ‘Dropdown visible only for users NOT logged in’ is closed to new replies.