Changeset 1420170
- Timestamp:
- 05/19/2016 08:02:29 AM (10 years ago)
- Location:
- wc-wallet
- Files:
-
- 4 edited
-
tags/1.0.2/includes/functions.php (modified) (1 diff)
-
tags/1.0.2/wcw.php (modified) (3 diffs)
-
trunk/includes/functions.php (modified) (1 diff)
-
trunk/wcw.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wc-wallet/tags/1.0.2/includes/functions.php
r1408393 r1420170 898 898 * 899 899 * @param int $order_type 900 * @param string $o rder_status900 * @param string $old_status 901 901 * 902 902 * @since 1.0.2 903 903 * 904 904 */ 905 function wcw_check_the_order_status( $order_id ){905 function wcw_check_the_order_status( $order_id, $old_status ){ 906 906 $order = new WC_Order( $order_id ); 907 907 $order_type = get_post_meta( $order_id, '_payment_method', true ); 908 $order_status = "wc-".$o rder->get_status();908 $order_status = "wc-".$old_status; 909 909 $array = json_decode( get_option('wcw_transfer_only'), true ); 910 910 $order_array = isset($array[$order_type]) ? $array[$order_type] : false; 911 if( $order_array &&array_search($order_status, $order_array) !== null){911 if( $order_array && array_search( $order_status, $order_array ) !== false ){ 912 912 return true; 913 913 }else{ -
wc-wallet/tags/1.0.2/wcw.php
r1408393 r1420170 6 6 * Author URI: http://hemzware.com 7 7 * Description: Activate this plugin to make the wallet system with WooCommerce.! 8 * Version: 1.0. 28 * Version: 1.0.3 9 9 */ 10 10 … … 16 16 * @var The current version of the plugin 17 17 */ 18 private $version = '1.0. 1';18 private $version = '1.0.3'; 19 19 20 20 /** … … 202 202 } 203 203 if( array_search( $order_id, get_the_order_in_log() ) === false ) { 204 if( count(get_wcw_only_methods()) == 0 || array_search( get_post_meta( $order_id, '_payment_method', true ), get_wcw_only_methods() ) !== false ){ 204 if( count(get_wcw_only_methods()) != 0 && array_search( get_post_meta( $order_id, '_payment_method', true ), get_wcw_only_methods() ) !== false && wcw_check_the_order_status( $order_id, $old_status ) ){ 205 error_log( "Count: ".count(get_wcw_only_methods()) ); 206 error_log("bool: ".wcw_check_the_order_status( $order_id )); 205 207 $order_total = get_post_meta($order_id, '_order_total', true); 206 208 $order = wc_get_order( $order_id ); -
wc-wallet/trunk/includes/functions.php
r1408393 r1420170 898 898 * 899 899 * @param int $order_type 900 * @param string $o rder_status900 * @param string $old_status 901 901 * 902 902 * @since 1.0.2 903 903 * 904 904 */ 905 function wcw_check_the_order_status( $order_id ){905 function wcw_check_the_order_status( $order_id, $old_status ){ 906 906 $order = new WC_Order( $order_id ); 907 907 $order_type = get_post_meta( $order_id, '_payment_method', true ); 908 $order_status = "wc-".$o rder->get_status();908 $order_status = "wc-".$old_status; 909 909 $array = json_decode( get_option('wcw_transfer_only'), true ); 910 910 $order_array = isset($array[$order_type]) ? $array[$order_type] : false; 911 if( $order_array &&array_search($order_status, $order_array) !== null){911 if( $order_array && array_search( $order_status, $order_array ) !== false ){ 912 912 return true; 913 913 }else{ -
wc-wallet/trunk/wcw.php
r1408393 r1420170 6 6 * Author URI: http://hemzware.com 7 7 * Description: Activate this plugin to make the wallet system with WooCommerce.! 8 * Version: 1.0. 28 * Version: 1.0.3 9 9 */ 10 10 … … 16 16 * @var The current version of the plugin 17 17 */ 18 private $version = '1.0. 1';18 private $version = '1.0.3'; 19 19 20 20 /** … … 202 202 } 203 203 if( array_search( $order_id, get_the_order_in_log() ) === false ) { 204 if( count(get_wcw_only_methods()) == 0 || array_search( get_post_meta( $order_id, '_payment_method', true ), get_wcw_only_methods() ) !== false ){ 204 if( count(get_wcw_only_methods()) != 0 && array_search( get_post_meta( $order_id, '_payment_method', true ), get_wcw_only_methods() ) !== false && wcw_check_the_order_status( $order_id, $old_status ) ){ 205 error_log( "Count: ".count(get_wcw_only_methods()) ); 206 error_log("bool: ".wcw_check_the_order_status( $order_id )); 205 207 $order_total = get_post_meta($order_id, '_order_total', true); 206 208 $order = wc_get_order( $order_id );
Note: See TracChangeset
for help on using the changeset viewer.