Plugin Directory

Changeset 2452302


Ignore:
Timestamp:
01/08/2021 05:03:13 AM (5 years ago)
Author:
usetada
Message:

1.1.0 release

Location:
usetada
Files:
8 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • usetada/trunk/includes/class.usetada-api.php

    r2260943 r2452302  
    5353        );
    5454
     55        $headers            = array(
     56            'Content-Type'          => 'application/json',
     57            'Authorization'     => 'Bearer ' . $token
     58        );
     59
    5560        if( ! empty( $cashier_pin ) ){
    5661            $param['cashierPin'] = (int)$cashier_pin;
     
    6166        }
    6267
     68        // Add decimals header if decimals enable in setting
     69        $decimals       = get_option( 'woocommerce_price_num_decimals' );
     70        if( $decimals )
     71            $headers['x-vnd-app-use-decimal']   = '1';
     72
    6373        $response = wp_remote_post( 'https://api.gift.id/v1/pos/phone/topup', array(
    6474            'body'      => json_encode( $param ),
    65             'headers'   => array(
    66                 'Content-Type'          => 'application/json',
    67                 'Authorization'     => 'Bearer ' . $token
    68             )
     75            'headers'   => $headers
    6976        ) );
    7077
  • usetada/trunk/includes/class.usetada-woocommerce.php

    r2261793 r2452302  
    4040     */
    4141    public static function order_topup( $order_id ){
     42        $decimals               = get_option( 'woocommerce_price_num_decimals' );
    4243        $status                 = get_post_meta( $order_id, 'usetada_topup_status', true );
    4344        $order                  = wc_get_order( $order_id );
     
    4849            return false;
    4950
    50         $order_total        = $order->get_subtotal() - $order->discount_total;
     51        $order_total        = $order->get_subtotal() - $order->get_discount_total();
    5152        $payment_method = $order->get_payment_method();
    5253
     
    5455        if( count( $order_items ) > 0 ){
    5556            foreach( $order_items as $order_item ){
    56                 $product = wc_get_product( $order_item->get_product_id() );
     57                $product = $order_item->get_variation_id() ? wc_get_product( $order_item->get_variation_id() ) : wc_get_product( $order_item->get_product_id() );
    5758                $items[] = array(
    5859                    'sku'           => $product->get_sku(),
    59                     'itemName'  => $product->get_name(),
     60                    'itemName'  => $order_item->get_name(),
    6061                    'quantity'  => $order_item->get_quantity(),
    61                     'price'     => $order_item->get_total()
     62                    'price'     => number_format( $order_item->get_total(), $decimals, '.', '' )
    6263                );
    6364            }
  • usetada/trunk/includes/class.usetada.php

    r2312017 r2452302  
    2424            }
    2525        }
    26 
    2726    }
    2827
  • usetada/trunk/readme.txt

    r2382771 r2452302  
    33Tags: woocommerce, loyalty, discount, membership, referral
    44Donate link:
    5 Requires at least: 4.0
    6 Tested up to: 5.3
    7 Requires PHP: 5.6
    8 Stable tag: 1.0.7
     5Requires at least: 5.2
     6Tested up to: 5.6
     7Requires PHP: 7.0
     8Stable tag: 1.1.0
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7575== Changelog ==
    7676
     77= 1.1.0 =
     78
     79Release date: Jan 8th, 2020
     80
     81* Compatibility check with WooCommerce 4.8.0
     82* Compatibility check with WordPress 5.6
     83* Add support for variable product
     84* Send additional request headers for decimals
     85
    7786= 1.0.7 =
    7887
    79 Release data: Sept 16rd, 2020
     88Release date: Sept 16rd, 2020
    8089
    8190* Toogle rewards button, when wallet widget is not rendered
     
    8392= 1.0.6 =
    8493
    85 Release data: Sept 16rd, 2020
     94Release date: Sept 16rd, 2020
    8695
    8796* Open box of tada wallet widget after render them
     
    8998= 1.0.5 =
    9099
    91 Release data: Sept 16rd, 2020
     100Release date: Sept 16rd, 2020
    92101
    93102* Update embed tada wallet web
     
    95104= 1.0.4 =
    96105
    97 Release data: March 27rd, 2020
     106Release date: March 27rd, 2020
    98107
    99108* Update widget initialization javascript file to prevent widget error on load
     
    101110= 1.0.3 =
    102111
    103 Release data: March 23rd, 2020
     112Release date: March 23rd, 2020
    104113
    105114* Add widget initialization javascript file to prevent widget error on load
  • usetada/trunk/usetada.php

    r2382771 r2452302  
    44 * Plugin URI: https://usetada.com/
    55 * Description: Retain your customers using loyalty, membership, subscription, referral, & many more!
    6  * Version: 1.0.7
     6 * Version: 1.1.0
    77 * Author: TADA
    88 * Author URI: https://usetada.com
     
    1010 * License URI: https://www.gnu.org/licenses/gpl-2.0.en.html
    1111 * Domain Path: /languages
     12 * WC requires at least: 4.0.0
     13 * WC tested up to: 4.8.0
    1214 */
    1315
Note: See TracChangeset for help on using the changeset viewer.