• Resolved jonofat

    (@jonofat)


    I am sending some data to an external API and I need to send the value of the terms and conditions selected by the user on the checkout page. It is a select 2 dropdown menu and I can see that it is called ‘tandcs_’

    I am using this action add_action('woocommerce_thankyou', 'wdm_send_order_to_ext');

    and I retrieve the data like this for instance:

        $order = wc_get_order($order_id);
        $order_data = $order->get_data(); // The Order data
        $email = $order->get_billing_email();

    But I cannot for the life of me get the t&c field. I also tried $_POST[‘tandcs_’] but that doesn’t give me anything.

    • This topic was modified 3 years ago by jonofat.
Viewing 1 replies (of 1 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi there,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook Community group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

Viewing 1 replies (of 1 total)
  • The topic ‘How to get terms and conditions value at checkout’ is closed to new replies.