You will have to execute do_shortcode()
on your $button
.
$ptoutput .= '<div class="pt-buynow"><a href="' . $url . '" class="mt-button large">' . do_shrtcode( $button ) . '</a></div>' . "\n";
Be aware of endless recursions!
You may also check if the $button
is set as a shortcode, if you want to force one.
if ( !has_shortcode( $button, 'another_shortcode' ) ) { // Fallbacks to enforce the Shortcode
As this is not tested, you may have to add the brackets of your shortcode in $button
afterwards, to ensure the original shortcode does work properly, but unfortunately I do not know exactly if you need to do that.
$button = '[' . $button . ']';