Help needed with woocommerce (wc stripe) filter

in filtering one of the meta, you can stop capture depending of the order content

add_filter("get_post_metadata", function ($value, $object_id, $meta_key, $single) {


    if ("_stripe_charge_id" === $meta_key) {

        $order = wc_get_order($object_id);


        if (???) {
            // stop capture
            $value = FALSE;
        }

    }


    return $value;

}, 10, 4);