'; return str_replace( $search, '
' . $captcha_input . '
'; return $captcha; } /** * Display captcha wrapper. * * @since 1.0.0 */ function aioc_render_captcha_wrapper() { echo ''; } /** * Display captcha input. * * @since 1.0.0 */ function aioc_render_captcha_input() { echo ''; } /** * Display turnstile wrapper. * * @since 1.0.0 */ function aioc_render_turnstile_wrapper() { $sitekey = aioc_option( 'aioc_site_key' ); $theme = aioc_option( 'aioc_turnstile_theme' ); $size = aioc_option( 'aioc_turnstile_size' ); $language = aioc_option( 'aioc_turnstile_language' ); $appearance = aioc_option( 'aioc_turnstile_appearance' ); echo ''; } /** * Display hcaptcha wrapper. * * @since 1.0.0 */ function aioc_render_hcaptcha_wrapper() { $sitekey = aioc_option( 'aioc_site_key' ); $theme = aioc_option( 'aioc_hcaptcha_theme' ); $size = aioc_option( 'aioc_hcaptcha_size' ); $language = aioc_option( 'aioc_hcaptcha_language' ); echo ''; } /** * Enqueue scripts. * * @since 1.1.0 */ function aioc_woo_checkout_block_scripts() { $input_name = '[name="g-recaptcha-response"]'; if ( aioc_is_captcha_type( 'hcaptcha' ) ) { $input_name = '[name="h-captcha-response"]'; } elseif ( aioc_is_captcha_type( 'cloudflare-turnstile' ) ) { $input_name = '[name="cf-turnstile-response"]'; } $captcha_input = aioc_get_captcha_input(); echo ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>