esc_url_raw( rest_url( AVCAP_REST_NAMESPACE . '/' ) ), 'ai' => avcap_ai_ready(), 'aiBadge' => ! empty( $s['ai_badge'] ), 'voice' => array( 'input' => ! empty( $s['voice_input'] ), 'output' => $s['voice_output'], 'lang' => $locale, ), 'woo' => array( 'products' => $woo && ! empty( $s['woo_products'] ), 'orders' => $woo && ! empty( $s['woo_orders'] ), 'auto' => $woo && ! empty( $s['woo_products'] ) && ! empty( $s['woo_auto'] ), ), 'history' => ! empty( $s['history_enabled'] ), 'hours' => array( 'enabled' => ! empty( $s['hours_enabled'] ), 'timezone' => wp_timezone_string(), 'days' => array_values( $s['hours'] ), 'message' => $closed, 'hideCall' => ! empty( $s['closed_hide'] ), ), 'i18n' => array( 'aiBadge' => __( 'AI answer', 'avi-support-assistant-pro' ), 'listen' => __( 'Speak your question', 'avi-support-assistant-pro' ), 'listening' => __( 'Listening…', 'avi-support-assistant-pro' ), 'micError' => __( 'I could not hear you. Please allow microphone access or type your question.', 'avi-support-assistant-pro' ), 'mute' => __( 'Mute spoken replies', 'avi-support-assistant-pro' ), 'unmute' => __( 'Turn on spoken replies', 'avi-support-assistant-pro' ), 'findProduct' => __( 'Find a product', 'avi-support-assistant-pro' ), 'findPrompt' => __( 'Sure! What are you looking for?', 'avi-support-assistant-pro' ), 'productsIntro' => __( 'Here is what I found:', 'avi-support-assistant-pro' ), 'noProducts' => __( 'I could not find a matching product. Try different words.', 'avi-support-assistant-pro' ), 'view' => __( 'View', 'avi-support-assistant-pro' ), 'addToCart' => __( 'Add to cart', 'avi-support-assistant-pro' ), 'outOfStock' => __( 'Out of stock', 'avi-support-assistant-pro' ), 'trackOrder' => __( 'Track my order', 'avi-support-assistant-pro' ), 'orderPrompt' => __( 'Please enter your order number and the email used for the order.', 'avi-support-assistant-pro' ), 'orderNumber' => __( 'Order number', 'avi-support-assistant-pro' ), 'orderEmail' => __( 'Email address', 'avi-support-assistant-pro' ), 'check' => __( 'Check status', 'avi-support-assistant-pro' ), 'checking' => __( 'Checking…', 'avi-support-assistant-pro' ), /* translators: 1: Order number, 2: Order status, 3: Order date, 4: Order total. */ 'orderStatus' => __( 'Order #%1$s is %2$s. Placed on %3$s, total %4$s.', 'avi-support-assistant-pro' ), 'orderFill' => __( 'Please enter the order number and a valid email address.', 'avi-support-assistant-pro' ), 'error' => __( 'Sorry, something went wrong. Please try again.', 'avi-support-assistant-pro' ), ), ); wp_enqueue_style( 'avcap-frontend', AVCAP_URL . 'assets/css/pro.css', array( 'avca-frontend' ), AVCAP_VERSION ); wp_enqueue_script( 'avcap-frontend', AVCAP_URL . 'assets/js/pro.js', array( 'avca-frontend' ), AVCAP_VERSION, true ); return $data; } add_filter( 'avca_script_data', 'avcap_script_data' );