Plugin Directory

Changeset 2868238


Ignore:
Timestamp:
02/20/2023 02:57:53 PM (3 years ago)
Author:
aftercommerce
Message:

update the warranty plan.

Location:
afterinc-app/trunk
Files:
2 edited

Legend:

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

    r2867418 r2868238  
    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.9.3
     6Version: 3.9.4
    77Author: After Inc.
    88Author URI: https://www.afterinc.com
     
    10621062     for($x = 0; $x < $planLength; $x++) {   
    10631063   ?>
    1064       <input type="radio" id="war_<?php echo esc_attr($i); ?>" class="price-variation warranty-button" warranty-price="<?php echo esc_attr($seqPlans[$x]['price']); ?>" product-id="<?php echo esc_attr($product->get_id()) ?>" name="warranty" value="<?php echo esc_attr($seqPlans[$x]['planId']); ?>/<?php echo esc_attr($seqPlans[$x]['term']); ?>" plan-id="<?php echo esc_attr($seqPlans[$x]['planId']); ?>" <?php echo esc_attr($seqPlans[$x]['planId']) == $plan_id ? 'checked' : '' ?> >
     1064      <input type="radio" id="war_<?php echo esc_attr($i); ?>" class="price-variation warranty-button" warranty-price="<?php echo esc_attr($seqPlans[$x]['price']); ?>" product-id="<?php echo esc_attr($product->get_id()) ?>" name="warranty" value="<?php echo esc_attr($seqPlans[$x]['planId']); ?>/<?php echo esc_attr($seqPlans[$x]['description']); ?>/<?php echo esc_attr($seqPlans[$x]['term']); ?>" plan-id="<?php echo esc_attr($seqPlans[$x]['planId']); ?>" <?php echo esc_attr($seqPlans[$x]['planId']) == $plan_id ? 'checked' : '' ?> >
    10651065     
    10661066       <label for="age_<?php echo esc_attr($i); ?>" class="label-text"><?php echo esc_attr($seqPlans[$x]['description']); ?></label><br>
     
    19331933
    19341934          $cart_item_data['warranty'] = $warranty[0];
    1935           $cart_item_data['term'] = $warranty[1];
     1935          $cart_item_data['description'] = $warranty[1];
     1936          $cart_item_data['term'] = $warranty[2];
    19361937
    19371938         $cart_items = WC()->cart->cart_contents;
     
    20082009          $warrantyData = array(
    20092010            'plan_id' => $values['warranty'],
     2011            'description' => $values['description'],
    20102012            'term' => $values['term']
    20112013          );
     
    22962298      if($plan_id !== 'none') {
    22972299
    2298        $term = $item_warranty->value['term'];
     2300       $description = $item_warranty->value['description'];
    22992301       $result = $this->wpdb->get_results( $this->wpdb->prepare( "SELECT * FROM quickcover_contract WHERE order_id = %s AND lineitem_id = %s", $productOrderId, $lineItemId ));
    23002302       
     
    23092311
    23102312     if (($isOrderreceived !== false) && ($isOrderreceived > 0)) {
    2311           return $name." ".$term." Months";
     2313           return $name." ".$description;
    23122314      }else{
    2313           return $name." ".$term." Months ".$cancelButton." <br> <span class='contract-refund-text'>".$refundtxt.$this->get_currency_symbol().$refundamt."</span>";
     2315           return $name." ".$description." ".$cancelButton." <br> <span class='contract-refund-text'>".$refundtxt.$this->get_currency_symbol().$refundamt."</span>";
    23142316      }
    23152317
     
    23222324
    23232325      if (($isOrderreceived !== false) && ($isOrderreceived > 0)) {
    2324           return $name." ".$term." Months"; 
     2326          return $name." ".$description;  
    23252327      }else{
    2326           return $name." ".$term." Months ".$cancelButton." <br> ".$refundtxt;
     2328          return $name." ".$description." ".$cancelButton." <br> ".$refundtxt;
    23272329      }
    23282330     
     
    23352337
    23362338     if (($isOrderreceived !== false) && ($isOrderreceived > 0)) {
    2337           return $name." ".$term." Months"
     2339          return $name." ".$description
    23382340      }else{
    2339           return $name." ".$term." Months ". $cancelButton; 
     2341          return $name." ".$description." ". $cancelButton; 
    23402342      }
    23412343    }
     
    23462348
    23472349     if (($isOrderreceived !== false) && ($isOrderreceived > 0)) {
    2348           return $name." ".$term." Months";
     2350           return $name." ".$description;
    23492351           }else if(($isOrderReview !== false) && ($isOrderReview > 0)){
    2350             return $name." ".$term." Months ". $cancelButton; 
     2352             return $name." ".$description." ". $cancelButton;  
    23512353          }else{
    2352            return $name." ".$term." Months";
     2354           return $name." ".$description;
    23532355          }
    23542356        }
     
    24912493     <?php
    24922494       
    2493         $term = $item_warranty->value['term'];
    2494 
    2495         echo "<b>".esc_attr($term)." Months </b>";
     2495        $description = $item_warranty->value['description'];
     2496
     2497        echo "<b>".esc_attr($description)."</b>";
    24962498
    24972499        $results = $this->wpdb->get_results( $this->wpdb->prepare( "SELECT * FROM quickcover_contract WHERE order_id = %s and lineitem_id = %s", $productOrderId, $lineItemId ));
  • afterinc-app/trunk/readme.txt

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