D
D
Djus12020-09-25 23:57:46
WordPress
Djus1, 2020-09-25 23:57:46

How can I paste a code/shortcode into a normal WooCommerce textbox?

Please help me, I need to print the code:

<?php global $woocommerce;
           $total = $woocommerce->cart->total;
           $total_5_price = ($total / 100 * 95);
            echo $total_5_price  .' '. get_woocommerce_currency_symbol();
              ?>

in the description of the woocommerce payment method, here is a photo for understanding:

5f6e594699671738646899.png

I can make a shortcode out of it, but it still does not work if I paste it there.

How can I display this code in the payment method description?

I will be glad for any help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
malente, 2020-09-29
@malente

Somewhere from here you need to dance: Allow shortcodes in product excerpts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question