Skip to content

Commit

Permalink
Fixed admin email on auto declined offers issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nirmalrdesai committed Jul 26, 2021
1 parent 88ffd2f commit f6a5e58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/class-offers-for-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ public function new_offer_form_submit() {
$new_email->template_plain_path = plugin_dir_path(__FILE__) . 'includes/emails/plain/';
}
$offer_args['is_anonymous_communication_enable'] = $this->ofw_is_anonymous_communication_enable();
if ( $offer_is_auto_decline == '' && $option_for_admin_disable_email_auto_decline == '' && ( $is_counter_offer || empty($payment_authorization)) ) {
if ( $offer_is_auto_decline == '' && ( $is_counter_offer || empty($payment_authorization)) ) {
$new_email->trigger($offer_args);
}
/**
Expand All @@ -1594,7 +1594,7 @@ public function new_offer_form_submit() {
$new_email->template_plain = 'woocommerce-offer-received.php';
$new_email->template_plain_path = plugin_dir_path(__FILE__) . 'includes/emails/plain/';

if ($offer_is_auto_decline == '' && $option_for_admin_disable_email_auto_decline == '' && ( $is_counter_offer || empty($payment_authorization) )) {
if ($offer_is_auto_decline == '' && ( $is_counter_offer || empty($payment_authorization) )) {
$new_email->trigger($offer_args);
}

Expand Down Expand Up @@ -2639,7 +2639,7 @@ public function wc_before_thankyou( $order_id ) {

$offer_args['is_anonymous_communication_enable'] = $this->ofw_is_anonymous_communication_enable();

if ($offer_is_auto_decline == '' && $option_for_admin_disable_email_auto_decline == '' ) {
if ($offer_is_auto_decline == '' ) {
$new_email->trigger( $offer_args);
}

Expand All @@ -2654,7 +2654,7 @@ public function wc_before_thankyou( $order_id ) {
$new_email->template_plain = 'woocommerce-offer-received.php';
$new_email->template_plain_path = plugin_dir_path(__FILE__) . 'includes/emails/plain/';

if ($offer_is_auto_decline == '' && $option_for_admin_disable_email_auto_decline == '') {
if ($offer_is_auto_decline == '' ) {
$new_email->trigger($offer_args);
}

Expand Down Expand Up @@ -2769,7 +2769,7 @@ public function wc_before_thankyou( $order_id ) {
$new_email->template_plain_path = $template_html_path.'plain/';
$new_email->template_html = $template_name;
$new_email->template_plain = $template_name;
if ($offer_is_auto_decline == '' && $option_for_admin_disable_email_auto_decline == '') {
if ($offer_is_auto_decline == '' ) {
$new_email->trigger( $offer_args );
}
}
Expand Down

0 comments on commit f6a5e58

Please sign in to comment.