Skip to content

Commit

Permalink
Fixed refund issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
malsubrata committed Dec 6, 2024
1 parent 01414bf commit 81a92a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/class-woo-wallet-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ public function terawallet_export_user_search() {
* @param WC_Order $order order.
*/
public function recalculate_order_cashback_after_calculate_totals( $and_taxes, $order ) {
if ( ! is_a( $order, 'WC_Order' ) ) {
return;
}
$cashback_amount = woo_wallet()->cashback->calculate_cashback( false, $order->get_id(), true );
$transaction_id = $order->get_meta( '_general_cashback_transaction_id' );
if ( $transaction_id ) {
Expand Down

0 comments on commit 81a92a9

Please sign in to comment.