• Resolved Josema

    (@josemadisruptivo)


    How do I get to know if user checked in checkbox to subscribe?

    I am trying to access like this:

    $order = wc_get_order( $order_id );
    
    $opt_in_status = $order->get_meta( 'opt_in_status' );

    Is this the right way?

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Josema

    (@josemadisruptivo)

    Anyone from support?

    Plugin Author ryanhungate

    (@ryanhungate)

    @josemadisruptivo you can use this meta key for checking

    mailchimp_woocommerce_is_subscribed

    which exists on the order, and on a user if you have a user ID to check against. It’s the same meta key for both, but the one on the user model is probably what you’re looking for if you want the most up to date status.

    You can use these as boolean true or false responses.

    Thread Starter Josema

    (@josemadisruptivo)

    Thank you Ryan!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get opt_in_status from order’ is closed to new replies.