diff --git a/inc/class.embed.php b/inc/class.embed.php index 2e758cd..2e1176a 100644 --- a/inc/class.embed.php +++ b/inc/class.embed.php @@ -36,7 +36,7 @@ private function embed($atts): string $output .= ''; break; case 3: - $output = $this->get_floating_popup_embed_script($atts['url'], $atts['text']); + $output = $this->get_floating_popup_embed_script($atts['url'], $atts['text'], $atts['customCalInstance']); break; default: $output = '
'; @@ -77,14 +77,22 @@ public function get_inline_embed_script($url, $custom_cal_url): string * * @param $url Booking link * @param $text Button text + * @param $custom_cal_url Custom cal.com URL (if self-hosted instance is used) * @return string */ - public function get_floating_popup_embed_script($url, $text): string + public function get_floating_popup_embed_script($url, $text, $custom_cal_url): string { $button_text = strlen($text) > 0 ? '"buttonText":"' . $text . '"' : ''; $script = '';