malsubrata / woo-wallet

WooCommerce Wallet
GNU General Public License v3.0
78 stars 37 forks source link

add "Top up user wallet on order status" option, for credit purchase #61

Closed nobandegani closed 1 year ago

nobandegani commented 3 years ago

when my customers added funds to their wallet, immediately after purchase, the fund added to their wallet. but i needed to check the payments first, and when i complete the order, they get their money in their wallet. but by default when order was in 'processing' or 'completed' fund added automatically.

but now you have 3 option to select, 'processing' = credit_purchase complete only if order is in processing status 'completed' = credit_purchase complete only if order is in completed status 'processing completed' = credit_purchase complete only if order is in processing or completed status

nobandegani commented 3 years ago

add 'wallet_payment_method_order_status' option

in default, when payment_complete( $wallet_response); executed, if there is no physical and shipping in product, the order status going to set to 'completed', not 'processing' like normal product. so i add this option to force the status, to set it to processing or completed by choice

nobandegani commented 3 years ago

update 'top_up_wallet_order_status' and 'wallet_payment_method_order_status' update texts, add default option, and improved the code