Skip to content

Commit

Permalink
Do not send admin notification if asset already sent.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeet committed Jul 26, 2021
1 parent 2c6b977 commit 0eec6cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 5 additions & 2 deletions liquid-assets-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
Plugin Name: Liquid Assets for WooCommerce
Description: Configure your products to reference Liquid Assets. The plugin will send Liquid Assets (coinos.io and your own Elements RPC node supported) to customers after successful payment.
Version: 1.8
Version: 1.8.1
Author: Andreas Tasch
Author URI: https://attec.at
License: MIT
Expand Down Expand Up @@ -213,7 +213,10 @@ function wcla_order_payment_complete( $order_id ) {

$logger->add('liquid-assets', $msg_asset_sent_status);
$order->add_order_note($msg_asset_sent_status);
wcla_send_admin_mail($msg_asset_sent_status . ' Order ID: ' . $order_id);
// Only send admin notification on error.
if ($status === 'error') {
wcla_send_admin_mail($msg_asset_sent_status . ' Order ID: ' . $order_id);
}
return false;
}

Expand Down
9 changes: 9 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,12 @@ In the search field type "Liquid Assets for WooCommerce". You can install it by
1. Download the plugin file to your computer and unzip it
2. Using an FTP program, or your hosting control panel, upload the unzipped plugin folder to your WordPress installation's wp-content/plugins/ directory.
3. Activate the plugin from the Plugins menu within the WordPress admin.

== Changelog ==

= 1.8.1 :: 2021-07-26 =
### Changed
* Do not send admin notification mails if asset was already successfully sent.

= 1.8.0 :: 2021-07-26 =
Initial public release.

0 comments on commit 0eec6cf

Please sign in to comment.