Adding static info to each payment method. #944
Answered
by
goclimbing
goclimbing
asked this question in
Q&A
-
I need to be able to add static info for each payment info (fee and time to ship). I don't want to over ride the template so looks like jQuery to write it. Any ideas on another way? |
Beta Was this translation helpful? Give feedback.
Answered by
goclimbing
Feb 3, 2025
Replies: 1 comment 1 reply
-
If you can't enter it in the backend, why not use label[for="payment_method_cheque"]::after {
content: "(No fee) Ships in 5 days";
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Basti,
thanks - that's another idea that might help.
I was able to find the hook. I'm considering adding BS tooltips.
add_filter('woocommerce_gateway_description', 'add_custom_text_after_payment_method', 20, 2);
function add_custom_text_after_payment_method($description, $payment_id)
{
// Add custom text for specific payment methods
switch ($payment_id) {
case 'bacs': // Bank Transfer
$custom_text = '
No Fee. Note: Bank transfers may take up to 3 business days to process.
';break;
case 'cod': // Cash on Delivery
$custom_text = '
Please have the exact amount ready at delivery.
';break;
case 'paypal': // PayPal
$custom_text = '
3% fee. Ships 2-3 days after payment clears. You will be redire…