1.6 – Multiply Balance
-
Updating from Version 1.5.15
to 1.6.0
The user’s balance is being incorrectly multiplied by 3
Latest Woo. Curcy – latest version.
I customised your plugin by:
wp-content/plugins/woo-wallet/includes/helper/woo-wallet-util.php
changing:$allowed_order_cols = array( 'transaction_id', 'user_id', 'amount', 'date', 'type', 'deleted' );
with:$allowed_order_cols = array( 'transaction_id', 'user_id', 'amount', 'date', 'type', 'deleted', 'currency' );
And added in functions.phpadd_filter( 'woo_wallet_transactions_query', function ( $query ) { if ( isset( $query[0] ) && ! isset( $query['select'] ) ) { $map = array( 'select', 'from', 'join', 'where', 'order_by', 'limit' ); $assoc = array(); foreach ( $map as $i => $key ) { if ( isset( $query[ $i ] ) ) { $assoc[ $key ] = $query[ $i ]; } } return $assoc; } return $query; }, 1 );
You must be logged in to reply to this topic.