Changeset 1590307
- Timestamp:
- 02/06/2017 10:27:58 PM (7 years ago)
- Location:
- wc-wallet
- Files:
-
- 12 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
wc-wallet/trunk/includes/cancel_requests.php
r1401564 r1590307 2 2 <?php 3 3 if( !is_cancel_request_enabled() ){ 4 wcw_plugin_success_msg( 'To have this feature, please enable cancel requests in settings under WC Wallet menu',"error");4 wcw_plugin_success_msg(,"error"); 5 5 } 6 6 ?> … … 13 13 <form method = "get"> 14 14 <div class="alignleft actions"> 15 <label for="filter-by-date" class="screen-reader-text"> Filter by date</label>15 <label for="filter-by-date" class="screen-reader-text"></label> 16 16 <select name="ID" id="filter-by-date"> 17 <option value="0"> All Users</option>17 <option value="0"></option> 18 18 <?php 19 19 $array = array(); … … 35 35 <thead> 36 36 <tr> 37 <th scope = "col"> Transaction ID</th>38 <th scope = "col"> User</th>39 <th scope = "col"> Order Number</th>40 <th scope = "col"> Amount</th>41 <th scope = "col"> Date</th>42 <th scope = "col"> Refund</th>37 <th scope = "col"></th> 38 <th scope = "col"></th> 39 <th scope = "col"></th> 40 <th scope = "col"></th> 41 <th scope = "col"></th> 42 <th scope = "col"></th> 43 43 </tr> 44 44 </thead> … … 91 91 <tfoot> 92 92 <tr> 93 <th scope = "col"> Transaction ID</th>94 <th scope = "col"> User</th>95 <th scope = "col"> Order Number</th>96 <th scope = "col"> Amount</th>97 <th scope = "col"> Date</th>98 <th scope = "col"> Refund</th>93 <th scope = "col"></th> 94 <th scope = "col"></th> 95 <th scope = "col"></th> 96 <th scope = "col"></th> 97 <th scope = "col"></th> 98 <th scope = "col"></th> 99 99 </tr> 100 100 </tfoot> -
wc-wallet/trunk/includes/functions.php
r1574650 r1590307 171 171 if( is_user_logged_in() ){ 172 172 if( get_user_meta( get_current_user_id(), 'onhold_credits',true ) !== null && get_user_meta( get_current_user_id(), 'onhold_credits',true ) != 0 ){ 173 WC()->cart->add_fee( 'Credits', -get_user_meta( get_current_user_id(), 'onhold_credits',true ), false, '' );173 WC()->cart->add_fee( 'Credits', -get_user_meta( get_current_user_id(), 'onhold_credits',true ), e, '' ); 174 174 } 175 175 } … … 455 455 } else { 456 456 457 $item_tax_rates = $tax_rates[ $_product->get_tax_class() ]; 457 if( $_product->get_tax_class() != false ) { 458 $item_tax_rates = $tax_rates[ $_product->get_tax_class() ]; 459 } else { 460 $item_tax_rates = 0; 461 } 458 462 459 463 // Work out a new base price without the shop's base tax … … 476 480 } 477 481 } 478 $tax = array_map( array( 'WC_Tax', 'round' ), $tax); 479 $tax = array_sum($tax); 482 if ( $tax ) { 483 $tax = array_map( array( 'WC_Tax', 'round' ), $tax); 484 $tax = array_sum($tax); 485 } 480 486 $shipping_total = WC()->shipping->shipping_total; 481 487 $shipping_taxes = WC()->shipping->shipping_taxes; … … 834 840 $order_id = (int)$_GET['order_id'] ? (int)$_GET['order_id'] : 0; 835 841 }else{ 836 home_url(); 842 wp_safe_redirect(wp_get_referer() ? wp_get_referer() : 843 get_permalink(get_option('woocommerce_myaccount_page_id'))); 837 844 die(); 838 845 } -
wc-wallet/trunk/includes/settings.php
r1574650 r1590307 9 9 } 10 10 } 11 12 11 13 12 14 $wcw_payment_method = explode( ",",get_option('wcw_payment_method') ); … … 78 80 echo "<table>"; 79 81 foreach( $methods as $key => $method ){ 80 $current_status = $wcw_transfer_only["$key"]; 81 echo "<tr>"; 82 echo "<td style ='padding-left: 0px; vertical-align: top;'>" . $method->title . "</td><td>"; 83 foreach( $sts as $keys => $status ){ 84 ?> 85 <label class = "w200" for="dashboard_right_now-hide_<?php echo $keys;?>_<?php echo $key;?>"> 86 <input class="hide-postbox-tog" name="wcw_transfer_only[<?php echo $key; ?>][]" type="checkbox" <?php if( $current_status&&in_array($keys, $current_status) ){ echo "checked"; } ?> id="dashboard_right_now-hide_<?php echo $keys;?>_<?php echo $key;?>" value="<?php echo $keys; ?>"> 87 <?php echo $status; ?> 88 </label> 89 <?php 82 if ( isset( $wcw_transfer_only["$key"] ) ) { 83 $current_status = $wcw_transfer_only["$key"]; 84 echo "<tr>"; 85 echo "<td style ='padding-left: 0px; vertical-align: top;'>" . $method->title . "</td><td>"; 86 foreach( $sts as $keys => $status ){ 87 ?> 88 <label class = "w200" for="dashboard_right_now-hide_<?php echo $keys;?>_<?php echo $key;?>"> 89 <input class="hide-postbox-tog" name="wcw_transfer_only[<?php echo $key; ?>][]" type="checkbox" <?php if( $current_status&&in_array($keys, $current_status) ){ echo "checked"; } ?> id="dashboard_right_now-hide_<?php echo $keys;?>_<?php echo $key;?>" value="<?php echo $keys; ?>"> 90 <?php echo $status; ?> 91 </label> 92 <?php 93 } 94 echo "</td></tr>"; 90 95 } 91 echo "</td></tr>";92 96 } 93 97 echo "</table>"; -
wc-wallet/trunk/languages/wc-wallet.pot
r1574650 r1590307 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: WC Wallet 1.0. 7\n"5 "Project-Id-Version: WC Wallet 1.0.\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wc-wallet\n" 7 "POT-Creation-Date: 2017-0 1-14 14:13:54+00:00\n"7 "POT-Creation-Date: 2017-0+00:00\n" 8 8 "MIME-Version: 1.0\n" 9 9 "Content-Type: text/plain; charset=UTF-8\n" … … 13 13 "Language-Team: LANGUAGE <LL@li.org>\n" 14 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 15 56 #: includes/functions.php:16 16 57 msgid "WooCommerce Wallet" 17 58 msgstr "" 18 59 19 #. #-#-#-#-# wc-wallet.pot (WC Wallet 1.0. 7) #-#-#-#-#60 #. #-#-#-#-# wc-wallet.pot (WC Wallet 1.0.) #-#-#-#-# 20 61 #. Plugin Name of the plugin/theme 21 62 #: includes/functions.php:19 … … 81 122 msgstr "" 82 123 83 #: includes/functions.php:86 2 includes/functions.php:878124 #: includes/functions.php:86 84 125 msgctxt "WooCommerce Order status" 85 126 msgid "On Cancel Request" 86 127 msgstr "" 87 128 88 #: includes/functions.php:8 67129 #: includes/functions.php:8 89 130 msgid "On Cancel Request <span class=\"count\">(%s)</span>" 90 131 msgid_plural "On Cancel Request <span class=\"count\">(%s)</span>" … … 92 133 msgstr[1] "" 93 134 94 #: includes/functions.php:92 1135 #: includes/functions.php:92 95 136 msgid "Available Credits: " 96 137 msgstr "" 97 138 98 #: includes/functions.php:9 23139 #: includes/functions.php:9 99 140 msgid "You need to login to see your credits" 100 141 msgstr "" 101 142 102 #: includes/functions.php:10 16 includes/functions.php:1018143 #: includes/functions.php:10 103 144 msgid "Wallet" 104 145 msgstr "" 105 146 106 #: includes/functions.php:10 33147 #: includes/functions.php:10 107 148 msgid "Hello" 108 149 msgstr "" 109 150 110 #: includes/functions.php:10 34151 #: includes/functions.php:10 111 152 msgid "Your wallet balance is" 112 153 msgstr "" 113 154 114 #: includes/functions.php:10 38155 #: includes/functions.php:10 115 156 msgid "Transaction Number" 116 157 msgstr "" 117 158 118 #: includes/functions.php:1039 119 msgid "Order Number" 120 msgstr "" 121 122 #: includes/functions.php:1040 123 msgid "Date" 124 msgstr "" 125 126 #: includes/functions.php:1041 159 #: includes/functions.php:1048 127 160 msgid "Usage" 128 161 msgstr "" 129 162 130 #: includes/functions.php:1042 131 msgid "Amount" 132 msgstr "" 133 134 #: includes/functions.php:1062 includes/functions.php:1064 163 #: includes/functions.php:1069 includes/functions.php:1071 135 164 msgid "Credits/money used from wallet" 136 165 msgstr "" 137 166 138 #: includes/functions.php:10 63167 #: includes/functions.php:10 139 168 msgid "Credits/money added to wallet" 140 169 msgstr "" 141 170 142 #: includes/functions.php:1 093171 #: includes/functions.php:1 143 172 msgid "Wallet Balance" 144 173 msgstr "" 145 174 146 #: includes/settings.php:4 1175 #: includes/settings.php:4 147 176 msgid "WC Wallet Settings" 148 177 msgstr "" 149 178 150 #: includes/settings.php:4 3179 #: includes/settings.php:4 151 180 msgid "General Settings" 152 181 msgstr "" 153 182 154 #: includes/settings.php:4 6183 #: includes/settings.php:4 155 184 msgid "Credits Applicable If The Order Are In These Method" 156 185 msgstr "" 157 186 158 #: includes/settings.php:6 1187 #: includes/settings.php:6 159 188 msgid "No Payment Methods found.!" 160 189 msgstr "" 161 190 162 #: includes/settings.php:6 4191 #: includes/settings.php:6 163 192 msgid "" 164 193 "When order is cancelled, if the above checked method are there, the cancel " … … 166 195 msgstr "" 167 196 168 #: includes/settings.php:7 0197 #: includes/settings.php:7 169 198 msgid "Credits Transfered When Order Status is in" 170 199 msgstr "" 171 200 172 #: includes/settings.php: 98201 #: includes/settings.php: 173 202 msgid "" 174 203 "This option is used to filter transfer of credits only if the checked status " … … 176 205 msgstr "" 177 206 178 #: includes/settings.php:10 4207 #: includes/settings.php:10 179 208 msgid "Apply Credits For Tax and Shipping?" 180 209 msgstr "" 181 210 182 #: includes/settings.php:1 07 includes/settings.php:118183 #: includes/settings.php:1 28 includes/settings.php:183211 #: includes/settings.php:1 212 #: includes/settings.php:1 184 213 msgid "Yes" 185 214 msgstr "" 186 215 187 #: includes/settings.php:108 includes/settings.php:119 216 #: includes/settings.php:112 includes/settings.php:123 217 #: includes/settings.php:133 218 msgid "No" 219 msgstr "" 220 221 #: includes/settings.php:119 222 msgid "Show wallet history and balance in My Account page?" 223 msgstr "" 224 188 225 #: includes/settings.php:129 189 msgid "No"190 msgstr ""191 192 #: includes/settings.php:115193 msgid "Show wallet history and balance in My Account page?"194 msgstr ""195 196 #: includes/settings.php:125197 226 msgid "Validate round value" 198 227 msgstr "" 199 228 200 #: includes/settings.php:13 0229 #: includes/settings.php:13 201 230 msgid "" 202 231 "Enabling this option, can values can be give as 200.99 and disabling this, " … … 204 233 msgstr "" 205 234 206 #: includes/settings.php:1 36235 #: includes/settings.php:1 207 236 msgid "Restrict Maximum credits" 208 237 msgstr "" 209 238 210 #: includes/settings.php:14 0239 #: includes/settings.php:14 211 240 msgid "" 212 241 "This can restrict maximum credits usage for a person. Leave blank for no " … … 214 243 msgstr "" 215 244 216 #: includes/settings.php:1 46245 #: includes/settings.php:1 217 246 msgid "Notify Admin" 218 247 msgstr "" 219 248 220 #: includes/settings.php:15 0249 #: includes/settings.php:15 221 250 msgid "Notify admin if any changes happen in user wallet." 222 251 msgstr "" 223 252 224 #: includes/settings.php:1 56253 #: includes/settings.php:1 225 254 msgid "Show Credits Remining In Cart" 226 255 msgstr "" 227 256 228 #: includes/settings.php:16 0257 #: includes/settings.php:16 229 258 msgid "" 230 259 "Hide or Show the remaining credits available for a user in the cart page." 231 260 msgstr "" 232 261 233 #: includes/settings.php:1 66262 #: includes/settings.php:1 234 263 msgid "New user credits" 235 264 msgstr "" 236 265 237 #: includes/settings.php:17 0266 #: includes/settings.php:17 238 267 msgid "Offer credits for new users, just like coupon." 239 268 msgstr "" 240 269 241 #: includes/settings.php:1 76270 #: includes/settings.php:1 242 271 msgid "Send Cancel Request Option" 243 272 msgstr "" 244 273 245 #: includes/settings.php:18 0274 #: includes/settings.php:18 246 275 msgid "Enable \"Send Cancel Request\"" 247 276 msgstr "" 248 277 249 #: includes/settings.php:18 4278 #: includes/settings.php:18 250 279 msgid "" 251 280 "Enabling this will add a button called \"Send Cancel Request\" in my-account " … … 253 282 msgstr "" 254 283 255 #: includes/settings.php:19 0284 #: includes/settings.php:19 256 285 msgid "" 257 286 "Automatically Cancel Order On \"Send Cancel Request\" and Refund Credits" 258 287 msgstr "" 259 288 260 #: includes/settings.php:19 4289 #: includes/settings.php:19 261 290 msgid "" 262 291 "If this option is not enabled, you need to customly click refund under " … … 264 293 msgstr "" 265 294 266 #: includes/settings.php:20 0295 #: includes/settings.php:20 267 296 msgid "Save Changes" 268 297 msgstr "" … … 362 391 msgstr "" 363 392 364 #: wcw.php:2 65393 #: wcw.php:2 365 394 msgid "Requires" 366 395 msgstr "" 367 396 368 #: wcw.php:2 65397 #: wcw.php:2 369 398 msgid "To Be Installed And Activated" 370 399 msgstr "" -
wc-wallet/trunk/readme.txt
r1574650 r1590307 3 3 Tags: wc wallet, wc credits, woocommerce wallet, cancelled order to wallet, woocommerce credits 4 4 Requires at least: 4.0 5 Tested up to: 4.7. 16 Stable tag: 1.0. 75 Tested up to: 4.7. 6 Stable tag: 1.0. 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 75 75 * My Account Menu 76 76 77 78 79 80 77 81 == Upgrade Notice == 78 82 … … 100 104 = 1.0.7 = 101 105 Awesome. We have fixed the bugs and added new Features. Update to 1.0.7 106 107 108 -
wc-wallet/trunk/wcw.php
r1574650 r1590307 6 6 * Author URI: http://hemzware.com 7 7 * Description: Activate this plugin to make the wallet system with WooCommerce.! 8 * Version: 1.0. 78 * Version: 1.0. 9 9 * Text Domain: wc-wallet 10 10 */ … … 20 20 * @var The current version of the plugin 21 21 */ 22 private $version = '1.0. 7';22 private $version = '1.0.'; 23 23 24 24 /** … … 158 158 add_action( 'admin_menu', array($this, 'wc_w_add_menus'), 5 ); 159 159 register_activation_hook(__FILE__, array( $this, 'add_options') ); 160 160 161 //add_action( 'woocommerce_order_status_cancelled', array($this, 'wc_m_move_order_money_to_user') ); 161 162 add_action( 'woocommerce_order_status_changed', array( $this, 'wc_m_move_order_money_to_user'), 99, 3 ); … … 249 250 } 250 251 252 253 254 255 256 257 258 259 251 260 252 261 }
Note: See TracChangeset
for help on using the changeset viewer.