• I have a custom field in user profiles to record the VAT number of the user’s company. I have made a shortcode which is used to display the VAT number in the website through the content editor. I have tried to use this shortcode in one of the invoice text boxes but when generating an invoice it just shows the shortcode, not the VAT number.

    Is there a filter we can run through your text field to implement shortcodes? Or is this something you could implement in to the next update? I don’t want to alter the plugin directly myself.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vishal Kothari

    (@ashokrane)

    @coderra Apologies for the late reply. Incase you are still facing this problem, can you tell me in which text box are you trying to add the shortcode?

    There are quite a few filters available, like wcdn_order_info_name, wcdn_order_info_content, wcdn_order_info_fields & many others. We haven’t tested the plugin with shortcodes yet.

    I hope that helps.

    :Vishal

    Thread Starter Coderra Ltd

    (@coderra)

    Hi Vishal.

    I’ve just tried to use one of my own shortcodes in most of the fields, the one I’d like it to work in is the Shop Address field.

    With advanced custom fields I know you can apply the_content filter to a field which then allows it to use shortcodes. Like this:

    apply_filters(‘the_content’, get_field(‘field_name’));

    Are we able to do something similar to allow shortcodes in your text fields? It would be a really useful feature as we could then use shortcodes in PDF to generate dynamic content based on the customer.

    Thanks for coming back to me, and let me know what you think.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Shortcodes in content’ is closed to new replies.