By default, the Elementor button element “text” field doesn’t render shortcodes. If you want to embed an If-So shortcode into an Elementor button field in order to display a dynamic text on the button, paste the following code at the end of your functions.php file.
//Elementor button - render shortcode in URL
add_filter('elementor/widget/before_render_content',function($el){
if($el->get_name()==='button'){
$link_setting = $el->get_settings('link');
if(!empty($link_setting)){
$link_setting['url'] = do_shortcode($link_setting['url']);
}
$el->set_settings('link',$link_setting);
}
});