nozzlegear / ShopifySharp

ShopifySharp is a .NET library that helps developers easily authenticate with and manage Shopify stores.
https://nozzlegear.com/shopify-development-handbook
MIT License
742 stars 309 forks source link

disable order confirmation email, OrderCreateOptions, SendReceipt and SendFulfillmentReceipt #433

Open marchanddesable opened 4 years ago

marchanddesable commented 4 years ago

Hello,

I can't disable the order confirmation email, I know this is not possible "without the API", but it seems like with the official API, there is a way to do it...

In shopifysharp there is two boleans for that "SendReceipt" and "sendFulFillmentReceipt", but it doesn't seem to work.

How can I disable those options ?

It seems by adding this parametter, it will disable the confirmation email:

suppress_notifications: true

https://community.shopify.com/c/Shopify-APIs-SDKs/how-to-prevent-emails-from-sending-to-customers-when-importing/td-p/416457/page/2

https://community.shopify.com/c/Shopify-APIs-SDKs/POST-orders-JSON-Ignoring-Receipt-Flags-gt-Order-confirmation/td-p/453948

Thanks

marchanddesable commented 4 years ago

I updated the nugget package to the last version, created a new order. I did not receive the email, but I have received a SMS ...

I don't see any option in the OrderCreateOptions that allow me to disable the order confirmation email AND SMS.

I tried this solution:

` public class MyOrderCreateOptions : OrderCreateOptions { [JsonProperty("suppress_notifications")] public bool? SuppressNotifications { get; set; } }

Order resultOrder = await shopifyOrdersService.CreateAsync(order, opts); ` If I check in the shopify admin, in the order history, I have the expected result, no notifications have been sent.

tchoupicc commented 1 year ago

Hi, can you please explain to me where you change this part of the code to disable Shopify order confirmation emails? Thanks!