Setono / SyliusGiftCardPlugin

Sell gift cards on your Sylius store and let users use them in the checkout process
MIT License
44 stars 40 forks source link

Allow preventing sending the notification email on GC creation #219

Closed Roshyo closed 2 years ago

Roshyo commented 2 years ago

Fixes #205

image

image

codecov[bot] commented 2 years ago

Codecov Report

Merging #219 (7ec1891) into 0.12.x (5ae31ba) will increase coverage by 0.59%. The diff coverage is 21.42%.

@@             Coverage Diff              @@
##             0.12.x     #219      +/-   ##
============================================
+ Coverage     49.73%   50.32%   +0.59%     
- Complexity      528      532       +4     
============================================
  Files           102      102              
  Lines          1687     1699      +12     
============================================
+ Hits            839      855      +16     
+ Misses          848      844       -4     
Impacted Files Coverage Δ
src/Form/Type/GiftCardType.php 0.00% <0.00%> (ø)
...ener/SendEmailWithGiftCardToCustomerSubscriber.php 85.71% <100.00%> (+85.71%) :arrow_up:
src/Model/GiftCard.php 75.45% <100.00%> (+0.92%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5ae31ba...7ec1891. Read the comment docs.

loevgaard commented 2 years ago

I think what this PR is missing is the case where an administrator updates a gift card, but doesn't change the email, then the user would get an email notification again.

This could easily be solved, I think, by just having the sendNotificationEmail property to be false by default