Plugin Directory

Changeset 2477424


Ignore:
Timestamp:
02/18/2021 11:49:10 PM (5 years ago)
Author:
nellalink
Message:

1.1.6

  • Bug fixes & txn_check_fxn included
Location:
rimplenet/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • rimplenet/trunk/README.txt

    r2469226 r2477424  
    44Tags: wallet-creator, ewallet, e-wallet, ebanking, e-banking, mlm, matrix, matrix-tree, investments, investment-plugin, fintech, loan-plugin-maker, woocommerce-payment-processor-maker
    55Requires at least: 3.0.1
    6 Tested up to: 5.6
    7 Stable tag: 1.1.5
     6Tested up to: 5.6.1
     7Stable tag: 1.1.6
    88Requires PHP: 5.6
    99License: GPLv2 or later
     
    8080
    8181== Changelog ==
     82= 1.1.6 =
     83* Bug fixes & txn_check_fxn included
    8284= 1.1.5 =
    8385* Investment Rules not Counting Fixed
     
    106108
    107109== Upgrade Notice ==
     110= 1.1.6 =
     111* Bug fixes & txn_check_fxn included
    108112= 1.1.5 =
    109113* Investment Rules not Counting Fixed
  • rimplenet/trunk/includes/class-rimplenet-mlm.php

    r2463673 r2477424  
    302302
    303303        $user_info = get_user_by('ID', $user_id);
    304         $walllets = new rimplenet_Wallets();
     304        $wallet_obj = new rimplenet_Wallets();
     305        $walllets = $wallet_obj->getWallets();
     306   
    305307        $decimal = $walllets[$wallet_id]['decimal'];
    306308        $amount_formatted = number_format($amount,$decimal);
  • rimplenet/trunk/includes/class-rimplenet-rules.php

    r2469226 r2477424  
    318318      $product_id = trim($rule_array[1]);
    319319     
    320       if($product_id=='ANY_PRODUCT' AND  wc_get_customer_total_spent($user->ID)>1000){// hardcoded for amount greater 1000
     320      if($product_id=='ANY_PRODUCT' AND  wc_get_customer_total_spent($user->ID)>=1000){// hardcoded for amount greater 1000
    321321         
    322322         $status = rimplenetRulesExecuted($rule,$user,$obj_id,$args);
  • rimplenet/trunk/includes/class-wallets.php

    r2465133 r2477424  
    305305   
    306306
    307     if ($amount_to_add>0) {
     307   if ($amount_to_add>0) {
    308308     $tnx_type = 'CREDIT';
    309309   }
     
    333333
    334334function add_user_mature_funds_to_wallet($user_id,$amount_to_add,$wallet_id, $note='',$tags=[]){
    335 
    336 
    337    $key = 'user_withdrawable_bal_'.strtolower($wallet_id);
    338    $user_balance = get_user_meta($user_id, $key, true);
    339 
    340    if (!is_numeric($user_balance) and !is_int($user_balance)){
    341     $user_balance = 0;
    342    }
    343    
     335   
     336    if(!empty($tags['txn_ref'])){
     337        $external_txn_id = $tags['txn_ref'];
     338        $ext_txn_id = rimplenet_txn_exist($user_id,$external_txn_id);
     339        if($ext_txn_id>1){
     340            return $ext_txn_id;
     341        }
     342        $note .= " ~ #$external_txn_id";
     343    }
     344
    344345   if($amount_to_add===0){
    345346       return ;// don't transact 0
    346347   }
    347 
     348   
     349   $key = 'user_withdrawable_bal_'.strtolower($wallet_id);
     350   $user_balance = get_user_meta($user_id, $key, true);
     351
     352    if (!is_numeric($user_balance) and !is_int($user_balance)){
     353     $user_balance = 0;
     354    }
     355   
    348356    $bal_before = $user_balance;
    349357    $user_balance_total = $this->get_total_wallet_bal($user_id,$wallet_id);
     
    377385   
    378386    update_post_meta($txn_add_bal_id, 'funds_type', $key);
     387    if(!empty($tags['txn_ref'])){
     388      update_post_meta($txn_add_bal_id, 'external_txn_id', $external_txn_id);
     389    }
    379390
    380391    do_action("after_add_user_mature_funds_to_wallet",$txn_add_bal_id,$user_id,$amount_to_add,$wallet_id,$note,$tags,$tnx_type);
     
    713724function getRimplenetWalletFormattedAmount($amount,$wallet_id,$include_data=''){
    714725   
     726        if(empty($include_data)){$include_data = array();}
     727        else{ $include_data = explode(",",$include_data);}
     728       
    715729        $wallet_obj = new Rimplenet_Wallets();
    716730        $all_wallets = $wallet_obj->getWallets();
     
    734748}
    735749
     750 
     751 function rimplenet_txn_exist($user_id,$external_txn_id){
     752       
     753                   $txn_loop = new WP_Query(
     754                             array( 
     755                               'post_type' => 'rimplenettransaction',
     756                               'post_status' => 'any',
     757                               'author' => $user_id ,
     758                               'posts_per_page' => 1,
     759                               'tax_query' => array(
     760                                   'relation' => 'OR',
     761                                   array(
     762                                    'taxonomy' => 'rimplenettransaction_type',
     763                                    'field'    => 'name',
     764                                    'terms'    => array( 'CREDIT' ),
     765                                   ),
     766                                  array(
     767                                    'taxonomy' => 'rimplenettransaction_type',
     768                                    'field'    => 'name',
     769                                    'terms'    => array( 'DEBIT' ),
     770                                      ),
     771                                  ),
     772                                )
     773                              );
     774                             
     775                       if( $txn_loop->have_posts() ){
     776                          while( $txn_loop->have_posts() ){
     777                       
     778                                $txn_loop->the_post();
     779                                $txn_id = get_the_ID();
     780                                $status = get_post_status();
     781                               
     782                                if(get_post_meta($txn_id, "external_txn_id",true)==$external_txn_id){
     783                                    return $txn_id;
     784                                }
     785                           
     786                          }
     787             
     788                       }
     789   
     790       
     791    }
    736792
    737793function rimplenet_user_wallet_profile_fields( $user ) { ?>
  • rimplenet/trunk/includes/page-templates/rimplenet-single-product-template.php

    r2469226 r2477424  
    7777           
    7878           
     79                    WC()->cart->add_to_cart( $productId, $quanity_to_be_bought );// add to cart first
    7980                    $order = wc_create_order(array('customer_id'=>$user_id)); 
    8081                    $order->add_product( wc_get_product($productId ), $quanity_to_be_bought);
  • rimplenet/trunk/public/layouts/design-wallet-from-shortcode.php

    r2468941 r2477424  
    195195               
    196196              ?>
    197                 <option value="<?php echo $wallet_id_op; ?>" > <?php echo $disp_info; ?> </option>
     197                <option value="<?php echo $wallet_id_op; ?>"> <?php echo $disp_info; ?> </option>
    198198            <?php
    199199               }
     
    214214               
    215215             ?>
    216             <option value="<?php echo $wallet_id_op; ?>" selected> <?php echo $disp_info; ?> </option>
     216            <option value="<?php echo $wallet_id_op; ?>"> <?php echo $disp_info; ?> </option>
    217217        <?php
    218218             }
  • rimplenet/trunk/rimplenet.php

    r2469226 r2477424  
    1717 * Plugin URI:        https://rimplenet.com
    1818 * Description:       Rimplenet E-Banking | E-Wallets  | Investments Plugin | MLM | Matrix Tree | Referral Manager | FinTech
    19  * Version:           1.1.5
     19 * Version:           1.1.6
    2020 * Author:            Nellalink
    2121 * Author URI:        https://rimplenet.com
Note: See TracChangeset for help on using the changeset viewer.