Plugin Directory

Changeset 2017244


Ignore:
Timestamp:
01/23/2019 12:45:56 AM (7 years ago)
Author:
developerqualpay
Message:

changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qualpay/trunk/includes/class-qualpay-woocommerce.php

    r1987329 r2017244  
    154154    public function form()
    155155    {
    156        $Cart_total = WC()->cart->total;
     156        $order_id_order_pay = absint( get_query_var( 'order-pay' ) );
     157        if($order_id_order_pay) {
     158             $order = new WC_Order( $order_id_order_pay );
     159             $Cart_total = $order->get_total();
     160        } else {
     161            $Cart_total = WC()->cart->total;
     162        }
    157163       if($Cart_total > 0 || (Qualpay_Cart::recurring_in_cart())) { 
    158164        $transient_key = $this->get_transient_key();
     
    180186        global $woocommerce;
    181187
    182         $Cart_total = WC()->cart->total;
    183        
     188        $order_id_order_pay = absint( get_query_var( 'order-pay' ) );
     189        if($order_id_order_pay) {
     190             $order = new WC_Order( $order_id_order_pay );
     191             $Cart_total = $order->get_total();
     192        } else {
     193            $Cart_total = WC()->cart->total;
     194        }
     195       
    184196        if($Cart_total > 0 || (Qualpay_Cart::recurring_in_cart())) {
    185197           
Note: See TracChangeset for help on using the changeset viewer.