Changeset 2477424
- Timestamp:
- 02/18/2021 11:49:10 PM (5 years ago)
- Location:
- rimplenet/trunk
- Files:
-
- 7 edited
-
README.txt (modified) (3 diffs)
-
includes/class-rimplenet-mlm.php (modified) (1 diff)
-
includes/class-rimplenet-rules.php (modified) (1 diff)
-
includes/class-wallets.php (modified) (5 diffs)
-
includes/page-templates/rimplenet-single-product-template.php (modified) (1 diff)
-
public/layouts/design-wallet-from-shortcode.php (modified) (2 diffs)
-
rimplenet.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
rimplenet/trunk/README.txt
r2469226 r2477424 4 4 Tags: wallet-creator, ewallet, e-wallet, ebanking, e-banking, mlm, matrix, matrix-tree, investments, investment-plugin, fintech, loan-plugin-maker, woocommerce-payment-processor-maker 5 5 Requires at least: 3.0.1 6 Tested up to: 5.6 7 Stable tag: 1.1. 56 Tested up to: 5.6.1 7 Stable tag: 1.1.6 8 8 Requires PHP: 5.6 9 9 License: GPLv2 or later … … 80 80 81 81 == Changelog == 82 = 1.1.6 = 83 * Bug fixes & txn_check_fxn included 82 84 = 1.1.5 = 83 85 * Investment Rules not Counting Fixed … … 106 108 107 109 == Upgrade Notice == 110 = 1.1.6 = 111 * Bug fixes & txn_check_fxn included 108 112 = 1.1.5 = 109 113 * Investment Rules not Counting Fixed -
rimplenet/trunk/includes/class-rimplenet-mlm.php
r2463673 r2477424 302 302 303 303 $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 305 307 $decimal = $walllets[$wallet_id]['decimal']; 306 308 $amount_formatted = number_format($amount,$decimal); -
rimplenet/trunk/includes/class-rimplenet-rules.php
r2469226 r2477424 318 318 $product_id = trim($rule_array[1]); 319 319 320 if($product_id=='ANY_PRODUCT' AND wc_get_customer_total_spent($user->ID)> 1000){// hardcoded for amount greater 1000320 if($product_id=='ANY_PRODUCT' AND wc_get_customer_total_spent($user->ID)>=1000){// hardcoded for amount greater 1000 321 321 322 322 $status = rimplenetRulesExecuted($rule,$user,$obj_id,$args); -
rimplenet/trunk/includes/class-wallets.php
r2465133 r2477424 305 305 306 306 307 if ($amount_to_add>0) {307 if ($amount_to_add>0) { 308 308 $tnx_type = 'CREDIT'; 309 309 } … … 333 333 334 334 function 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 344 345 if($amount_to_add===0){ 345 346 return ;// don't transact 0 346 347 } 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 348 356 $bal_before = $user_balance; 349 357 $user_balance_total = $this->get_total_wallet_bal($user_id,$wallet_id); … … 377 385 378 386 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 } 379 390 380 391 do_action("after_add_user_mature_funds_to_wallet",$txn_add_bal_id,$user_id,$amount_to_add,$wallet_id,$note,$tags,$tnx_type); … … 713 724 function getRimplenetWalletFormattedAmount($amount,$wallet_id,$include_data=''){ 714 725 726 if(empty($include_data)){$include_data = array();} 727 else{ $include_data = explode(",",$include_data);} 728 715 729 $wallet_obj = new Rimplenet_Wallets(); 716 730 $all_wallets = $wallet_obj->getWallets(); … … 734 748 } 735 749 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 } 736 792 737 793 function rimplenet_user_wallet_profile_fields( $user ) { ?> -
rimplenet/trunk/includes/page-templates/rimplenet-single-product-template.php
r2469226 r2477424 77 77 78 78 79 WC()->cart->add_to_cart( $productId, $quanity_to_be_bought );// add to cart first 79 80 $order = wc_create_order(array('customer_id'=>$user_id)); 80 81 $order->add_product( wc_get_product($productId ), $quanity_to_be_bought); -
rimplenet/trunk/public/layouts/design-wallet-from-shortcode.php
r2468941 r2477424 195 195 196 196 ?> 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> 198 198 <?php 199 199 } … … 214 214 215 215 ?> 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> 217 217 <?php 218 218 } -
rimplenet/trunk/rimplenet.php
r2469226 r2477424 17 17 * Plugin URI: https://rimplenet.com 18 18 * Description: Rimplenet E-Banking | E-Wallets | Investments Plugin | MLM | Matrix Tree | Referral Manager | FinTech 19 * Version: 1.1. 519 * Version: 1.1.6 20 20 * Author: Nellalink 21 21 * Author URI: https://rimplenet.com
Note: See TracChangeset
for help on using the changeset viewer.