Plugin Directory

Changeset 2601662


Ignore:
Timestamp:
09/20/2021 10:19:27 AM (5 years ago)
Author:
slimcd
Message:

Added user choice to update status after payment

Location:
slimcd-payment-gateway
Files:
19 added
4 edited

Legend:

Unmodified
Added
Removed
  • slimcd-payment-gateway/trunk/README.txt

    r2574476 r2601662  
    44Requires at least: 4.9.0
    55Tested up to: 5.8
    6 Stable tag: 1.0.1
     6Stable tag: 1.0.2
    77Requires PHP: 7.0.0
    88License: GPLv2 or later
     
    9595= 1.0.1 =
    9696Fixed reported bugs.
     97
     98= 1.0.2 =
     99Added user choice to select status after payment.
  • slimcd-payment-gateway/trunk/includes/class-slimcd-payment-gateway.php

    r2576606 r2601662  
    185185    {
    186186        $order = wc_get_order($order_id);
    187         $order->update_status('processing');
     187        $order->update_status(trim($this->get_option('slimcd_wc_status_after_payment')));
    188188        WC()->cart->empty_cart();
    189189    }
     
    196196    public function slimcd_redirect()
    197197    {
     198
    198199        if (!empty($_GET['order_id'])) {
    199200            $order = wc_get_order($_GET['order_id']);
    200             if ($order->get_payment_method() == "slimcd_payment" && $order->get_status() == "processing") {
     201            $currentOrderStatus = $order->get_status();
     202            if ($order->get_payment_method() == "slimcd_payment" && ($currentOrderStatus == "processing" || $currentOrderStatus == "completed")) {
    201203                wp_redirect($order->get_checkout_order_received_url());
    202204            } else if ($_GET && $_GET['sessionid'] !== "") {
  • slimcd-payment-gateway/trunk/includes/settings-slimcd-payment.php

    r2593306 r2601662  
    9696    ),
    9797
     98    'slimcd_wc_status_after_payment_details' => array(
     99        'title' => __('WooCommerce Status', 'slimcd-payment-gateway'),
     100        'type' => 'title',
     101        'description' => __('Enter desired WooCommerce status after payment completion ', 'slimcd-payment-gateway'),
     102    ),
     103
     104    'slimcd_wc_status_after_payment' => array(
     105        'title' => __('Order status', 'slimcd-payment-gateway'),
     106        'type' => 'select',
     107        'options' => array('processing' => __('Processing', 'slimcd-payment-gateway'), 'completed' => __('Completed', 'slimcd-payment-gateway')),
     108        'description' => __('Add your the order status after payment', 'slimcd-payment-gateway'),
     109        'desc_tip' => true,
     110    ),
     111
    98112    'slimcd_formname_card_details' => array(
    99113        'title' => __('Credit Card Options', 'slimcd-payment-gateway'),
  • slimcd-payment-gateway/trunk/slimcd-payment-for-woocommerce.php

    r2574482 r2601662  
    55 * Plugin URI: https://slimcd.com/woocommerce/
    66 * Description: Slim CD’s gateway system was designed to allow merchants to take any kind of electronic payment with a single piece of software – quickly, easily, painlessly, from any PC.
    7  * Version: 1.0.1
     7 * Version: 1.0.2
    88 * Author: SlimCD
    99 * Author URI: https://slimcd.com/
Note: See TracChangeset for help on using the changeset viewer.