Run Function if Order Meta Exists – WooCommerce
WooCommerce orders are posts and behave the same as any WordPress post. So you can use the same WordPress functions to update or read the post meta data. <?php $meta_values = get_post_meta($post_id, $key, $single); ?> For your example I’d suggest: $match_order_meta = get_post_meta( $order->ID, ‘My_Checkbox’, TRUE); The ‘TRUE’ flag tells WordPress to return the value … Read more