ramya
Forum Replies Created
-
Thanks @arsalantariq
Any code is available to update user balance/points without a log entry.
I cannot understand it any example code available
Yes, I read out the API documentation but there are no clear examples of how to use it and searched online for examples but nothing was found.
Please, give some examples
What I need is
1. check the user if exists if not return a message ‘no account founds’
2. Display the current balancefunction wpb_api(){ $current_user = wp_get_current_user(); $mail = $current_user->user_email; $secret_key = '*****kjmsJvT'; $remote_url = 'https://example.com/api-dev/'; $action = 'GET'; $account = '$mail'; $point_type = 'mycred_default'; $host = get_bloginfo( 'url' ); $token = md5( $host . $action . $secret_key ); $request = array( 'method' => 'POST', 'body' => array( 'action' => $action, 'account' => $account, 'type' => $point_type, 'token' => $token, 'host' => $host ) ); $response = wp_remote_post( $remote_url, $request ); $balance_html = wp_remote_retrieve_body( $response ); echo $balance_html; } add_shortcode('api-test','wpb_api');
This shortcode returns the current user balance. This shortcode is correct to use or not and how to return the message (check the user if exists if not return a message ‘no account founds’)
Forum: Plugins
In reply to: [Wallet for WooCommerce] Social Login not working with Referral Systemnot only with mini orange another plugin like Heater social login, Super Socializer
the Referral is not working.$user_id = get_current_user_id();
$user = new WP_User($user_id);
$referral_url_by_userid = ‘id’ === $settings[‘referal_link’] ? true : false;
$referral_url = add_query_arg($referral->referral_handel, $user->user_login, wc_get_page_permalink(‘myaccount’));
if ($referral_url_by_userid) {
$referral_url = add_query_arg($referral->referral_handel, $user->ID, wc_get_page_permalink(‘myaccount’));
}Forum: Plugins
In reply to: [Ocean Extra] icon visiblityboth theme and all plugins are in an updated version.
yes this code works
but in some social share options, it copies the page link instead of the referral link example copy link, emailForum: Plugins
In reply to: [Social Sharing Plugin - Sassy Social Share] shortcode for urlecho do_shortcode(‘[TheChamp-Sharing url=”‘.$referral_url.'”]’);
Forum: Plugins
In reply to: [Ocean Extra] icon visiblityyes, I tried but it does not work. in the previous version, it works properly so I rollbacked to v.1.6.5
Forum: Plugins
In reply to: [Social Sharing Plugin - Sassy Social Share] shortcode for urlhello there is any solution to this
Forum: Plugins
In reply to: [Wallet for WooCommerce] Total cashback earned@roberto22 I will give the code for free send your contact email
Forum: Plugins
In reply to: [WooCommerce] Upcoming sale messageHi @stuartduff
what is the hook for upcoming sale productForum: Plugins
In reply to: [Wallet for WooCommerce] Total cashback earned@roberto22 did you get that code
- This reply was modified 3 years, 10 months ago by ramya.
Forum: Plugins
In reply to: [Wallet for WooCommerce] Add wallet money at checkout@connordeancompanies how did you solve this
Forum: Plugins
In reply to: [Wallet for WooCommerce] Auto deduct FULL paymentadd this code in the function.php file and try it
//disable_payment_methods if enough balance in wallet
add_filter(‘woocommerce_available_payment_gateways’,’disable_payment_methods’);
function disable_payment_methods( $available_gateways ) {
global $woocommerce;
if ( !is_admin() ) {
if(isset($available_gateways[‘wallet’])) {
foreach ($available_gateways as $key => $value) {
if($key != ‘wallet’) {
unset($available_gateways[$key]);
}
}
}
}
return $available_gateways;
}