valehero
Forum Replies Created
-
Forum: Plugins
In reply to: [Wallet for WooCommerce] Wallet top up – payment remains pendingHi,
I had the same issue with this plugin.
Do you have a product Category called: Credit ?Goto: All Products
Then: Private
There you will see Product name: Wallet Topup
This product must be assigned to product category named: CreditIf you don’t have category named “Credit” then create it and assign the product Wallet Topup to Credit category.
Also enable Debugging from WooCom payment settings tab for the Payment gateway you are using. Then you will be able to see logs from WooCom Status page.
Hope it help, let know.
I need to disable and delete all old Transaction history cause now I have 30.000+ Transactions in all users history and it slows down my website by 6-7 seconds if I load the terra wallet pages.
Now I have deleted all users Transaction history and terra wallet pages loads in less than 1 second.
For now I came up with this code below, and I set it as Cron job to delete all Transaction history and update users credits:
<?php require_once("wp-config.php"); require_once("wp-includes/wp-db.php"); $users = get_users( array( 'fields' => array( 'ID' ) ) ); foreach($users as $key => $user_id){ $UID = $user_id->ID; $meta = get_user_meta( $UID, '_current_woo_wallet_balance', true ); $terra = woo_wallet()->wallet->get_wallet_balance($UID, 'edit'); if ($meta > 0) { $wpdb->query( "DELETE FROM wp_woo_wallet_transactions WHERE user_id = '$UID'" ); $transaction_id = woo_wallet()->wallet->credit( $UID, $meta, 'Updated' ); do_action( 'woo_wallet_admin_adjust_balance', $transaction_id ); update_user_meta($UID, '_current_woo_wallet_balance', $meta); } } ?>
Is there any better way to do this?
Is there a way to disable Transaction history so it wont grow so big and slow down the entire website?Sample: Show only last 10 or last 100 Transactions and delete all before that?
Important:
* I noticed memory usage went downs 20% after deleting all Transactions.
* CPU usage went down by 15% after deleting the all Transaction history.Forum: Plugins
In reply to: [Wallet for WooCommerce] How to get user credits without HTML?Exactly what I needed.
Adding the
'edit'
did the trick.
Thank you so much.Forum: Plugins
In reply to: [Wallet for WooCommerce] How to get user credits without HTML?UPDATE: I tried:
$credits = woo_wallet()->wallet->get_wallet_balance($user_id); echo $credits;
to get the HTML output above.
If your site name is: ‘Google’
Then make it look: ‘Google ; ‘
I had to add semicolon “;” and space before and after it to make it work.
Note: The point is to make your IPN name unique, so if you select a common IPN name then it may not work?
Let me know if this helps ??Please consider to mark your question as Resolved.
Thank you very much, your answer SOLVED my problem ??
Simple SOLUTION:
In file:
wp-user-frontend/lib/gateway/paypal.phpOn line 159 I changed:
'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ),
TO:
'user-agent' => 'MySiteNAME ; ' . home_url( '/' ),
—-
After this change all is working as normally.