Add Currency shortcode in Payment Gateway Description

[ad_1]

Hello apwordpress,

Thanks for reaching out to us.

Which payment gateway plugin are you using, please?

We would like to investigate it on our end if it can work correctly.

Looking forward to hearing back from you.

Best regards,

Mia

Hi apwordpress again,

WooCommerce does not allow adding a shortcode into Payment description therefore, please try adding the following filter to functions.php (child theme) or Code Snippets plugin.

add_filter( ‘woocommerce_gateway_description’, ‘yay_curency_custom_woocommerce_gateway_description’, 10, 2); function yay_curency_custom_woocommerce_gateway_description( $description, $method_id ) { if(‘cod’ === $method_id ) { $description.= do_shortcode( ‘[yaycurrency-switcher]’ ); } return $description; }

Hope that helps.

Best regards,

Mia

Dear Mia,

Thank you for your support 😀

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer