• Resolved killerdog

    (@killerdog)


    Great plugin! Just some ideas for a future version (small details):

    1: Being able to customize the self-certification text “Due to European regulations we have to ask you to confirm your location” from the admin page. Seems most other text strings are editable but not this one?

    2: Option to ALWAYS REQUIRE customer self-certification on checkout page, no mater where the customer seems to be located in the world, or what the other self-certification settings may be. In the EU, you can never collect too much evidence about the customer location, in regards to VAT.

    Thanks so far!!

Viewing 1 replies (of 1 total)
  • Plugin Author Diego

    (@daigo75)

    The text you mentioned can be modified by using any localisation tool. You can simply change the text for your language, like it’s done with WooCommerce, and it will be displayed automatically.

    The self-certification element may no longer be required in a fairly near future. It’s not certain if such self-certification is considered valid evidence by all the EU countries (some of them suggested that it’s just a redundant confirmation of the billing country). Also, the EU committee is discussing changes in the logic used to collect evidence, and the billing country selected by the customer could become sufficient by itself.

    Still, if you want to make the field required, you can do so in two steps:

    1. Add the validate-required class to it on the frontend
    jQuery('#woocommerce_location_self_certification').addClass('validate-required');

    2. Validate the field at checkout

    
    add_action('woocommerce_checkout_process', function() {
      // Trigger an error if the self-certification box was not ticked
      if(empty($_POST['customer_location_self_certified'])) {
        wc_add_notice('You must certify your location', 'error');
      }
    }, 10);
    

    Note
    The above code is an example, provided as is. We haven’t tested it, you should use it as a reference to implement the logic you require.

Viewing 1 replies (of 1 total)
  • The topic ‘Future updates’ is closed to new replies.