phpclassic / php-shopify

PHP SDK for Shopify API
Apache License 2.0
568 stars 211 forks source link

Order metafields? #258

Closed fonko closed 2 years ago

fonko commented 2 years ago

I can't find any code for adding order meta fields, how do you proceed on this subject? is it possible to mix this API with the official Shopify rest API?

fonko commented 2 years ago

ok, i was able to do it so close this issue, sorry

$params = array( 'type' => 'single_line_text_field', 'namespace' => 'custom', 'owner_id' => $order, 'key' => 'wallet', 'value' => $wallet );

$metafield = $shopify->Order($order)->Metafield->post($params);