Plugin Directory

Changeset 2564578


Ignore:
Timestamp:
07/14/2021 06:20:28 PM (5 years ago)
Author:
slimcd
Message:

fixed email total error for new order

Location:
slimcd-payment-gateway
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • slimcd-payment-gateway/tags/1.0.0/includes/class-slimcd-payment-gateway.php

    r2561141 r2564578  
    118118            "zip" =>  $order->get_billing_postcode() ?? null,
    119119            "order_id" => $order->get_id(),
    120             'receiptlabel' => $receiptlabel,
    121             'company_name' => $order->get_billing_company() ?? null,
    122             'customer_note' => $order->get_customer_note() ?? null,
    123             'email' => $order->get_billing_email() ?? null,
     120            "receiptlabel" => $receiptlabel,
     121            "company_name" => $order->get_billing_company() ?? null,
     122            "customer_note" => $order->get_customer_note() ?? null,
     123            "email" => $order->get_billing_email() ?? null,
    124124        );
    125125
     
    167167                    include __DIR__ . '/convience-surcharge.php';
    168168                }
    169                 $order->update_status('processing');
    170                 WC()->cart->empty_cart();
     169                $this->slimcd_update_order_status($_POST['order_id']);
    171170                echo "OK";
    172171            } else {
     
    179178
    180179        die();
     180    }
     181   
     182     
     183     public function slimcd_update_order($order_id)
     184    {
     185        $order = wc_get_order($order_id);
     186        $order->update_status('processing');
     187        WC()->cart->empty_cart();
    181188    }
    182189
  • slimcd-payment-gateway/trunk/includes/class-slimcd-payment-gateway.php

    r2561141 r2564578  
    118118            "zip" =>  $order->get_billing_postcode() ?? null,
    119119            "order_id" => $order->get_id(),
    120             'receiptlabel' => $receiptlabel,
    121             'company_name' => $order->get_billing_company() ?? null,
    122             'customer_note' => $order->get_customer_note() ?? null,
    123             'email' => $order->get_billing_email() ?? null,
     120            "receiptlabel" => $receiptlabel,
     121            "company_name" => $order->get_billing_company() ?? null,
     122            "customer_note" => $order->get_customer_note() ?? null,
     123            "email" => $order->get_billing_email() ?? null,
    124124        );
    125125
     
    167167                    include __DIR__ . '/convience-surcharge.php';
    168168                }
    169                 $order->update_status('processing');
    170                 WC()->cart->empty_cart();
     169                $this->slimcd_update_order_status($_POST['order_id']);
    171170                echo "OK";
    172171            } else {
     
    179178
    180179        die();
     180    }
     181   
     182     
     183     public function slimcd_update_order($order_id)
     184    {
     185        $order = wc_get_order($order_id);
     186        $order->update_status('processing');
     187        WC()->cart->empty_cart();
    181188    }
    182189
Note: See TracChangeset for help on using the changeset viewer.