Forum Replies Created
-
AuthorPosts
-
in reply to: Issue With TopUp after latest update #5180
Works, thank you for the quick fix!
asking this gets added so i don’t need to change the core files.
it’s in /class-woo-wallet-cashback.phpin both functions:
calculate_cashback_form_order
please change
$order->get_subtotal(‘edit’)
to
$order->get_total(‘edit’)calculate_cashback_form_cart
please change
wc()->cart->get_subtotal(‘edit’)
to
wc()->cart->totalyes they should using total instead of subtotal. OR have the option to choose so.
@subratain reply to: Default order status #4268I know its not recommended, but i changed the top-up product to virtual and downloadable. That way Woocommerce completes the order automatically.
in reply to: How Do I Show Wallet Balance in Custom Area? #4267yes, just found it. its already a shortcode created for the use of the plugin within its core files.
it’s[mini-wallet]
in reply to: Feature Request: Change Notice Text #4266Final fix. but would be nice to have this documented somewhere.
add_filter(‘woo_wallet_cashback_notice_text’, ‘cash_back_text’);
function cash_back_text() {
$cashback_amount = woo_wallet()->cashback->calculate_cashback();
if (is_user_logged_in()) {
echo sprintf(__(‘Upon placing this order a cashback of %s will be credited to your wallet.’, ‘woo-wallet’), wc_price($cashback_amount, woo_wallet_wc_price_args()));
} else {
echo sprintf(__(‘TEST log in to avail %s cashback from this order.’, ‘woo-wallet’), esc_url(get_permalink(get_option(‘woocommerce_myaccount_page_id’))), wc_price($cashback_amount, woo_wallet_wc_price_args()));
}
}When in the else statement you can put whatever text you want. as you can see i put test as a test lol
you could use jquery to select it after the page finishes rendering.
If their balance is 0, it can’t be shown without hacking it together.
You can use this filter.
add_filter( ‘woo_wallet_payment_is_available’, ‘__return_true’);
But will need to do some more work arounds for error messages etc.It also creates the order still, but no payment gets captured (holding the order). You can work around this though.
in reply to: I found a bug about Terawallet #4263Not a bug. Requires custom coding.
Instead of giving $50, give them $10.
OR
Hire a developer who can setup a conditional php statement to disable woo-wallet as payment if cart total is less than a desired amount.
I’m no way affiliated with woo-wallet might I add.I’ll give you some tips to point you in the right direction. These filters turn on and off woo-wallet payment options.
//disables woo-wallet
add_filter( ‘woo_wallet_payment_is_available’, ‘__return_false’, -1);
//Always show woo-wallet as option hack
add_filter( ‘woo_wallet_payment_is_available’, ‘__return_true’);//This Woocommerce filter you can filter out which payments you want available.
add_filter( ‘woocommerce_available_payment_gateways’, ‘your_unset_gateways_function’ );your_unset_gateways_function being the function which you run your conditional statements to whether or not you should show or disable the woo-wallet.
Hope this helps.
Best,
JDPS I personally don’t do a credit program on registration as it’s too easy to manipulate.
in reply to: Remove Woo Wallet from 'My Account' Tab #3454check the FAQ of the documentation.
https://wpgenie.org/woocommerce-simple-auctions/documentation/#faqIt has the exact question and answer you are looking for.
in reply to: Show the wallet even without balance #3422This can’t be done without modifying core code. But you could try this depending on your setup.
add_filter( ‘woocommerce_no_available_payment_methods_message’, ‘top_up_balance_error’ );
function top_up_balance_error() {
//edit content to what you would like.
//make sure to add link to your wallet or add credits page.
$content = ‘Your balance is not enough. Top-up now to complete checkout’;
return $content;
}This will change the output for when there are no available payment methods from the generic
“Sorry, there is no available payment method for your current state…. etc”
-
AuthorPosts