Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Diego

    (@daigo75)

    There is no need for a filter. Simply set the field as “hidden” in the plugin options, and it won’t be displayed.

    Thread Starter jlang1

    (@jlang1)

    Want to move it from woocommerce_checkout_billing to woocommerce_after_checkout_billing_form because it lays before “create accout”

    Usually I use:
    remove_action(‘woocommerce_checkout_billing’,’thisfunction’,40);
    add_action(‘woocommerce_after_checkout_billing_form’,”thisfunction’,20);

    But don′t know how to remove: “Aelia\WC\EU_VAT_Assistant\WC_Aelia_EU_VAT_Assistant–>woocommerce_checkout_billing”

    Plugin Author Diego

    (@daigo75)

    As I wrote, simply set the field to “hidden” in the settings and the plugin will not attach the event to the woocommerce_checkout_billing hook. Then you will just have to use add_action() to add the field where you would like to have it.

    Please note that it will be up to you to render the EU VAT field correctly, so that the checkout page will work properly, as we cannot provide free support for customisations not made by us.

    Plugin Author Diego

    (@daigo75)

    If you still want to remove the hooked method, you should be able to do that with the following code:

    $aelia_euva = Aelia\WC\EU_VAT_Assistant\WC_Aelia_EU_VAT_Assistant::instance();
    remove_action('woocommerce_checkout_billing', array($aelia_euva, 'woocommerce_checkout_billing'), 40);

    Once again, we cannot provide free support for this type of customisations, it will be up to you to adjust the code to your needs. If you will need assistance with the implementation our troubleshooting, we could provide it as part of our paid support service.

    Thread Starter jlang1

    (@jlang1)

    Perfect:

    $aelia_euva = Aelia\WC\EU_VAT_Assistant\WC_Aelia_EU_VAT_Assistant::instance();
    remove_action('woocommerce_checkout_billing', array($aelia_euva, 'woocommerce_checkout_billing'), 40,1);
    add_action('woocommerce_after_checkout_billing_form', array($aelia_euva, 'woocommerce_checkout_billing'), 40,1);

    And it′s on the right position!

    Billing and shipping field can be filtered with “woocommerce_checkout_fields”. How to filter the fields that woocommerce_after_checkout_billing_form contains in order to include the Company field?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Move VAT field: remove_action’ is closed to new replies.