How do I use a plugin’s shortcode attribute value in another function?
I have a plugin as a class, where I am using a shortcode attribute to populate the $outlet variable. However, despite sanitize_text_field($atts['outlet']) returning the expected string , $this->outlet = sanitize_text_field($atts['outlet']) isn’t updating the value of $outlet. If I set a default value for the class’s $outlet initially, it works as expected below in the example_callback(). Everything else with the plugin works as expected. It’s just wp_news_shortcode() not assigning the $attr value…