Skip to content

Instantly share code, notes, and snippets.

@xeromorph
xeromorph / GetAsyncEnumerable.cs
Created June 6, 2020 10:11 — forked from Ilchert/GetAsyncEnumerable.cs
Read json array as async enumerable
public class Program
{
public static async Task Main(string[] args)
{
using var dataResponse = await client.GetAsync();
dataResponse.EnsureSuccessStatusCode();
await using var stream = await dataResponse.Content.ReadAsStreamAsync();
var pipe = PipeReader.Create(stream);
<?php
/**
* Add the field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>';