Changeset 1401564
- Timestamp:
- 04/21/2016 07:48:25 PM (10 years ago)
- Location:
- wc-wallet
- Files:
-
- 10 added
- 5 edited
-
tags/1.0.1 (added)
-
tags/1.0.1/includes (added)
-
tags/1.0.1/includes/cancel_requests.php (added)
-
tags/1.0.1/includes/functions.php (added)
-
tags/1.0.1/includes/settings.php (added)
-
tags/1.0.1/index.php (added)
-
tags/1.0.1/log (added)
-
tags/1.0.1/log/backend.php (added)
-
tags/1.0.1/readme.txt (added)
-
tags/1.0.1/wcw.php (added)
-
trunk/includes/cancel_requests.php (modified) (2 diffs)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/log/backend.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wcw.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wc-wallet/trunk/includes/cancel_requests.php
r1378218 r1401564 5 5 } 6 6 ?> 7 7 8 <h1>Cancel Requests</h1> 8 9 <?php 9 10 if( is_cancel_request_enabled() ){ 10 11 ?> 12 13 <form method = "get"> 14 <div class="alignleft actions"> 15 <label for="filter-by-date" class="screen-reader-text">Filter by date</label> 16 <select name="ID" id="filter-by-date"> 17 <option value="0">All Users</option> 18 <?php 19 $array = array(); 20 foreach( wc_w_get_log() as $log ){ 21 if( !in_array( $log["uid"], $array ) ){ 22 $array[] = $log["uid"]; 23 $user_info = get_userdata( $log["uid"] ); 24 ?><option value="<?php echo $user_info->ID; ?>" <?php if( isset( $_GET['filter_action'] ) && $_GET['ID'] == $user_info->ID ){ echo "selected = 'selected'"; }?>><?php echo $user_info->user_login; ?></option><?php 25 } 26 ?> 27 28 <?php } ?> 29 </select> 30 <input type="submit" name="filter_action" id="post-query-submit" class="button" value="Filter"> 31 </div> 32 <input type = "hidden" name ="page" value = "wc-wallet-cancel-requests"/> 33 </form> 11 34 <table class = "wp-list-table widefat fixed striped posts"> 12 35 <thead> … … 22 45 <?php 23 46 if( wc_w_get_cancel_requests() != 0 ){ 24 foreach( wc_w_get_cancel_requests() as $log ){ 25 $user_info = get_userdata( $log["uid"] ); 26 ?> 27 <tr> 28 <td><?php echo $log["ID"]; ?></td> 29 <td><a href = '<?php echo home_url()."/wp-admin/user-edit.php?user_id=".$log["uid"]?>' title = "View Profile"><?php echo $user_info->user_login; ?></a></td> 30 <td><a href = '<?php echo home_url()."/wp-admin/post.php?post=".$log["oid"]."&action=edit"; ?>' title = "View Order"><?php echo "#".$log["oid"]." - View Order"; ?></a></td> 31 <td><?php echo wc_price( $log["amount"] ); ?></td> 32 <td><?php echo $log["date"]?></td> 33 <td class = "wp-core-ui"> 47 if( isset( $_GET['filter_action'] ) && $_GET['filter_action'] == "Filter" ){ 48 foreach( wc_w_get_cancel_requests() as $log ){ 49 $user_info = get_userdata( $log["uid"] ); 50 $filter_id = $_GET['ID']; 51 if( $filter_id == 0 || $filter_id == $log['uid'] ){ 52 ?> 53 <tr> 54 <td><?php echo $log["ID"]; ?></td> 55 <td><a href = '<?php echo home_url()."/wp-admin/user-edit.php?user_id=".$log["uid"]?>' title = "View Profile"><?php echo $user_info->user_login; ?></a></td> 56 <td><a href = '<?php echo home_url()."/wp-admin/post.php?post=".$log["oid"]."&action=edit"; ?>' title = "View Order"><?php echo "#".$log["oid"]." - View Order"; ?></a></td> 57 <td><?php echo wc_price( $log["amount"] ); ?></td> 58 <td><?php echo $log["date"]?></td> 59 <td class = "wp-core-ui"> 60 <?php 61 $refund = $log['refund'] == 0 ? '<a href = "'.admin_url('admin-ajax.php?action=wcw_refund_order&order_id=' . $log["oid"] .'&pid=' . $log["ID"] ).'" id="post-query-submit" class="button">Refund as Credits</a>' : '<a href = "javascript:void(0);" id="post-query-submit" style="background: rgba(120, 119, 119, 0.21);" class="button">Already Redunded</a>'; 62 echo $refund; 63 ?> 64 </td> 65 <tr> 34 66 <?php 35 $refund = $log['refund'] == 0 ? '<a href = "'.admin_url('admin-ajax.php?action=wcw_refund_order&order_id=' . $log["oid"] .'&pid=' . $log["ID"] ).'" id="post-query-submit" class="button">Refund as Credits</a>' : '<a href = "javascript:void(0);" id="post-query-submit" style="background: rgba(120, 119, 119, 0.21);" class="button">Already Redunded</a>'; 36 echo $refund; 37 ?> 38 </td> 39 <tr> 40 <?php 67 } 68 } 69 }else{ 70 foreach( wc_w_get_cancel_requests() as $log ){ 71 $user_info = get_userdata( $log["uid"] ); 72 ?> 73 <tr> 74 <td><?php echo $log["ID"]; ?></td> 75 <td><a href = '<?php echo home_url()."/wp-admin/user-edit.php?user_id=".$log["uid"]?>' title = "View Profile"><?php echo $user_info->user_login; ?></a></td> 76 <td><a href = '<?php echo home_url()."/wp-admin/post.php?post=".$log["oid"]."&action=edit"; ?>' title = "View Order"><?php echo "#".$log["oid"]." - View Order"; ?></a></td> 77 <td><?php echo wc_price( $log["amount"] ); ?></td> 78 <td><?php echo $log["date"]?></td> 79 <td class = "wp-core-ui"> 80 <?php 81 $refund = $log['refund'] == 0 ? '<a href = "'.admin_url('admin-ajax.php?action=wcw_refund_order&order_id=' . $log["oid"] .'&pid=' . $log["ID"] ).'" id="post-query-submit" class="button">Refund as Credits</a>' : '<a href = "javascript:void(0);" id="post-query-submit" style="background: rgba(120, 119, 119, 0.21);" class="button">Already Redunded</a>'; 82 echo $refund; 83 ?> 84 </td> 85 <tr> 86 <?php 87 } 41 88 } 42 89 } -
wc-wallet/trunk/includes/functions.php
r1378218 r1401564 241 241 $onhold = get_user_meta( $uid, 'onhold_credits',true ); 242 242 $credit = get_user_meta( $uid, 'wc_wallet',true ); 243 if( $onhold != = null){243 if( $onhold != 0 ){ 244 244 update_user_meta( $uid, 'onhold_credits', 0 ); 245 245 update_user_meta( $uid, 'wc_wallet', $credit-$onhold ); 246 }247 }248 wc_w_add_to_log( $uid, $onhold, 0, $order_id );246 wc_w_add_to_log( $uid, $onhold, 0, $order_id ); 247 } 248 } 249 249 } 250 250 -
wc-wallet/trunk/log/backend.php
r1378218 r1401564 4 4 } 5 5 ?> 6 6 7 <div class = "wrap"> 7 8 <h1>Wallet / Credits Logs</h1> 8 <table class = "wp-list-table widefat fixed striped posts"> 9 10 <form method = "get"> 11 <div class="alignleft actions"> 12 <label for="filter-by-date" class="screen-reader-text">Filter by date</label> 13 <select name="ID" id="filter-by-date"> 14 <option value="0">All Users</option> 15 <?php 16 $array = array(); 17 foreach( wc_w_get_log() as $log ){ 18 if( !in_array( $log["uid"], $array ) ){ 19 $array[] = $log["uid"]; 20 $user_info = get_userdata( $log["uid"] ); 21 ?><option value="<?php echo $user_info->ID; ?>" <?php if( isset( $_GET['filter_action'] ) && $_GET['ID'] == $user_info->ID ){ echo "selected = 'selected'"; }?>><?php echo $user_info->user_login; ?></option><?php 22 } 23 ?> 24 25 <?php } ?> 26 </select> 27 <select name="filter_type" class="dropdown_product_cat"> 28 <option value="2">Type</option> 29 <option class="level-0" value="0" <?php if( isset( $_GET['filter_action'] ) && $_GET['filter_type'] == 0 ){ echo "selected = 'selected'"; }?>>Wallet to Credits</option> 30 <option class="level-0" value="1" <?php if( isset( $_GET['filter_action'] ) && $_GET['filter_type'] == 1 ){ echo "selected = 'selected'"; }?>>Credits to Wallet</option> 31 </select> 32 <input type="submit" name="filter_action" id="post-query-submit" class="button" value="Filter"> 33 </div> 34 <input type = "hidden" name ="page" value = "wallet"/> 35 </form> 36 <table class = "wp-list-table widefat fixed striped posts"> 9 37 <thead> 10 38 <tr> … … 17 45 </tr> 18 46 </thead> 19 <?php foreach( wc_w_get_log() as $log ){ 47 <?php 48 if( isset( $_GET['filter_action'] ) && $_GET['filter_action'] == "Filter" ){ 49 foreach( wc_w_get_log() as $log ){ 50 $filter_id = $_GET['ID']; 51 $filter_type = $_GET['filter_type']; 52 if( ( $filter_id == 0 || $filter_id == $log['uid']) && ( $filter_type == 2 || $filter_type == $log["wcw_type"] ) ){ 53 $user_info = get_userdata( $log["uid"] ); 54 ?> 55 <tr> 56 <td><?php echo $log["ID"]; ?></td> 57 <td><a href = '<?php echo home_url()."/wp-admin/user-edit.php?user_id=".$log["uid"]?>' title = "View Profile"><?php echo $user_info->user_login; ?></a></td> 58 <td><a href = '<?php echo home_url()."/wp-admin/post.php?post=".$log["oid"]."&action=edit"; ?>' title = "View Order"><?php echo "#".$log["oid"]." - View Order"; ?></a></td> 59 <td><?php wc_w_get_type( $log["wcw_type"] ); ?></td> 60 <td><?php echo wc_price( $log["amount"] ); ?></td> 61 <td><?php echo $log["date"]; ?></td> 62 <tr> 63 <?php } 64 } 65 }else{ 66 foreach( wc_w_get_log() as $log ){ 20 67 $user_info = get_userdata( $log["uid"] ); 21 68 ?> … … 28 75 <td><?php echo $log["date"]; ?></td> 29 76 <tr> 30 <?php }?> 77 <?php } 78 }?> 31 79 <tfoot> 32 80 <tr> -
wc-wallet/trunk/readme.txt
r1378252 r1401564 4 4 Requires at least: 3.5 5 5 Tested up to: 4.4.2 6 Stable tag: 1.0. 06 Stable tag: 1.0.1 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 42 42 = 1.0.0 = 43 43 * First Public Release. 44 45 = 1.0.1 = 46 * FIlter updater and Bugfix -
wc-wallet/trunk/wcw.php
r1378247 r1401564 5 5 * Author: Hemnath Mouli 6 6 * Author URI: http://hemzware.com 7 * Description: Activate this plugin to make the wallet system with woocommerce.!8 * Version: 1.0. 07 * Description: Activate this plugin to make the wallet system with WooCommerce.! 8 * Version: 1.0.1 9 9 */ 10 10 … … 16 16 * @var The current version of the plugin 17 17 */ 18 private $version = '1.0. 0';18 private $version = '1.0.1'; 19 19 20 20 /** … … 201 201 } 202 202 if( array_search( $order_id, get_the_order_in_log() ) === false ) { 203 if( count(get_wcw_only_methods()) == 0 || array_search( get_post_meta( $order->id, '_payment_method', true ), get_wcw_only_methods() ) !== false ){ 204 203 if( count(get_wcw_only_methods()) == 0 || array_search( get_post_meta( $order_id, '_payment_method', true ), get_wcw_only_methods() ) !== false ){ 205 204 $order_total = get_post_meta($order_id, '_order_total', true); 206 205 $order = wc_get_order( $order_id ); … … 214 213 215 214 $c = (string)$e; 216 217 215 if( -1*$ttyl[$c]['line_total'] ){ 218 216 $order_autho = get_post_meta($order_id, '_customer_user', true);
Note: See TracChangeset
for help on using the changeset viewer.