Plugin Directory

Changeset 2903452


Ignore:
Timestamp:
04/24/2023 05:22:16 PM (3 years ago)
Author:
aftercommerce
Message:

update the thankyou hook

Location:
afterinc-app/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • afterinc-app/trunk/Custom_app.php

    r2901831 r2903452  
    44Plugin URI: https://www.afterinc.com/contact/
    55Description: Plugin allows merchants to sell After Plan’s product protection plans for wide variety of products.
    6 Version: 3.5.5
     6Version: 3.5.6
    77Author: After Inc.
    88Author URI: https://www.afterinc.com
     
    155155    add_action( 'woocommerce_checkout_create_order_line_item', array($this,'add_custom_order_line_item_meta'),10,4 );
    156156
    157    // add_action( 'woocommerce_thankyou', array($this,'sync_order_quickcover'));
    158    add_action( 'woocommerce_checkout_order_processed', array($this,'sync_order_quickcover'));
     157    add_action( 'woocommerce_thankyou', array($this,'sync_order_quickcover'));
    159158
    160159    add_filter( 'woocommerce_valid_order_statuses_for_cancel', array($this,'custom_valid_order_statuses_for_cancel'), 10, 2 );
     
    23312330
    23322331if(isset($result[0]->contract_status) && $result[0]->contract_status == '200' && $result[0]->refund_amount !=''){
    2333   $refundtxt = "<b>Cancelled By: <b>".$result[0]->contract_canceled_by."<br> Contract has been Cancelled Successfully ,We have initiated the Refund of ";
     2332  $refundtxt = "<b>Cancelled By: <b>".$result[0]->contract_canceled_by."<br> Contract has been Cancelled Successfully. Refund ";
    23342333  //$refundamtqty = $result[0]->refund_amount * $item['quantity']/100;
    23352334  $refundamtqty = $result[0]->refund_amount * $item['quantity'];
     
    23412340           return $name." ".$description;
    23422341      }else{
    2343            return $name." ".$description." ".$cancelButton." <br> <span class='contract-refund-text'>".$refundtxt.$this->get_currency_symbol().$refundamt."</span>";
     2342           return $name . " " . $description . " " . $cancelButton . " <br> <span class='contract-refund-text'>" . $refundtxt . $this->get_currency_symbol() . $refundamt . "</span>";
    23442343      }
    23452344
     
    25312530       $refundamtqty = $results[0]->refund_amount * $item['quantity'];
    25322531      $refundamt = number_format((float)$refundamtqty, 2, '.', '');
    2533       echo '<p><button type="button" class="btn button-primary" data-orderId="'.esc_attr($productOrderId).'" data-lineItemID ="'.esc_attr($lineItemId).'" disabled=true style="cursor: not-allowed;">Cancelled '.esc_attr($pnameadmin).'</button></p><b>Cancelled By : '.esc_attr($results[0]->contract_canceled_by).'<b> <br>Contract has been cancelled successfully,We have initiated the <b>Refund of '.$this->get_currency_symbol().esc_attr($refundamt);
     2532      echo '<p><button type="button" class="btn button-primary" data-orderId="'.esc_attr($productOrderId).'" data-lineItemID ="'.esc_attr($lineItemId).'" disabled=true style="cursor: not-allowed;">Cancelled '.esc_attr($pnameadmin).'</button></p><b>Cancelled By : '.esc_attr($results[0]->contract_canceled_by).'<b> <br>Contract has been cancelled successfully.Please initiate a Refund of  ' . $this->get_currency_symbol() . esc_attr($refundamt).' to the customer.';
    25342533     }else if(isset($results[0]->contract_status) && $results[0]->contract_status == '250' && $results[0]->refund_amount !=''){
    25352534      echo '<p><button type="button" class="btn button-primary" data-orderId="'.esc_attr($productOrderId).'" data-lineItemID ="'.esc_attr($lineItemId).'" disabled=true style="cursor: not-allowed;">Cancelled '.esc_attr($pnameadmin).'</button></p><b><br>Cancel Request outside the cancel period,Please contract Administrator';
  • afterinc-app/trunk/readme.txt

    r2901831 r2903452  
    77Requires PHP: 7.2
    88WC tested up to: 5.6.0
    9 Stable tag: 3.5.5
     9Stable tag: 3.5.6
    1010License: GPLv3
    1111License URI: https://www.afterinc.com
Note: See TracChangeset for help on using the changeset viewer.