A.Tariq
Forum Replies Created
-
@marotiem,
Are you using the woo commerce plugin? What type of reward challenges/items are there on your website? The code snippet link provided by you works with woocommerce.Hi @ragib04,
Thank you for contacting us, It was a known issue to us. We have already fixed this issue in our upcoming release of the myCred plugin.@lilyrose00,
We have checked it on our environment. It is working fine. It could be your site-specific issue. Please let us know your PHP version, myCred plugin version, and theme. It helps us in identifying the issue.@marotiem,
Can you please make a small video of the whole scenario?Hi @ajoscor44,
Thank you for contacting us, Currently, this option is not available in our plugin. You can use ‘mycred_transfer’ short code to transfer points to another user and deduct points from a specific user. Please refer to the documentation link https://codex.mycred.me/shortcodes/mycred_transferHi @lilyrose00,
Thank you for contacting us, Please share the screenshot of your backend settings.@marotiem,
Please use the below-shared code also do let us know how it is working for you.add_filter('mycred_add', 'mycred_pro_no_negative_balance', 999, 2); function mycred_pro_no_negative_balance( $reply, $request ) { $mycred = mycred( $request['type'] ); // Ignore if allready declined if ( $reply === false ) return $reply; $balance = $mycred->get_users_balance( $request['user_id'], $request['type'] ); $request_new = $balance ; $request_old = $balance - $request['amount']; if ( $request['amount'] > 0 ) return $reply; if ( isset( $request['user_id'] ) ) { if ( ! $mycred->exclude_user( $request['user_id'] ) ) { if ( $request_new <= 0 || $request_old <= 0 ) { return false; } } } else { return $reply; } }
Hi @ecudoctor
Due to a lack of activity, we are going to mark this thread as resolved. If you have any other issues, please feel free to open a new thread.
Have a great day!
Hi @jack1132132
Due to a lack of activity, we are going to mark this thread as resolved. If you have any other issues, please feel free to open a new thread.
Have a great day!
Hi @gazarko
Due to a lack of activity, we are going to mark this thread as resolved. If you have any other issues, please feel free to open a new thread.
Have a great day!
@webdevinnovade,
Here’s the download link: https://we.tl/t-ghZKDmAMbo@marotiem,
Please use the following code snippet in your theme’s functions.php file:add_filter('mycred_add', 'mycred_pro_no_negative_balance', 999, 2); function mycred_pro_no_negative_balance( $reply, $request ) {
$mycred = mycred( $request['type'] ); // Ignore if allready declined if ( $reply === false ) return $reply; $balance = $mycred->get_users_balance( $request['user_id'], $request['type'] ); $request_new = $balance ; $request_old = $balance - $request['amount']; if ( $request['amount'] > 0 ) return $reply; if ( isset( $request['user_id'] ) ) { if ( ! $mycred->exclude_user( $request['user_id'] ) ) { if ( $request_new <= 0 || $request_old <= 0 ) { return false; } } } else { return $reply; }}Currently, there is no possibility for stopping redirection on link click.
Hi @marotiem,
Thank you for contacting us, With this code no negative logs will be created and user’s balance will never become negative. Try using the below code snippet and let us know if it works for you.add_filter( 'mycred_add', 'mycred_pro_no_negative_balance', 999, 2 ); function mycred_pro_no_negative_balance( $reply, $request ) {
$mycred = mycred( $request['type'] ); if ( isset( $request['user_id'] ) ) { if ( ! $mycred->exclude_user( $request['user_id'] ) ) { if ( $mycred->get_users_balance( $request['user_id'], $request['type'] ) <= 0 ) return false; } } return $reply;}@pagonz9,
Thank you for contacting us, Please refer to the documentation link of the shortcode. Read the CSS Styling section. Which title are you looking to remove? Please share the screenshots or make a short video of the scenario.@ecudoctor,
Thank you for contacting us, Please share more details about the issue. Please make a short video of the whole scenario. It will help us in identifying the issue. Can you please also clarify which problem was solved regarding view credits for users?