Skip to content

Tag: shortcode

Create order details shortcode for WooCommerce

Hey I am trying to build a shortcode for my order details on the order received page. The code below will generate the last result and then on top of it, it will display the word Array. My guess is that something in the foreach loop i am creating is still an array, but I dont know what to do

How to add if and else condition in wordpress shortcode

I have a shortcode showing the username of the current user, it works. What I want to do is insert conditions. if the user has the username show it, otherwise show first name or something else. I searched on google and here on stack, I understood this is possible thanks to the if and else conditions but I&#82…