• Resolved mrnicnic

    (@mrnicnic)


    There’s an issue with the “redurl” attribute in the shortcode. Shortcode attributes is passed as an array but you’ve set it as a string. If you set a value in the shortcode, it’s displaying as “Array”.

    Current incorrect code:

    function wdgk_donation_form_shortcode_html($redurl){ 
      ...
      if (!empty($redurl) && isset($redurl)) {
        $cart_url = $redurl;
      }
    }
    

    Here’s an example of how to pass the attributes correctly: https://developer.wordpress.org/plugins/shortcodes/shortcodes-with-parameters/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Problem with shortcode attribute’ is closed to new replies.