Reply To: Feature Request: Change Notice Text2019-12-03T13:06:07+05:30

Home Forums Core Feature Request: Change Notice Text Reply To: Feature Request: Change Notice Text

Post count: 12

Final 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