Custom Captcha validation on the registration form issue

I think i over complicated a bit 🙂 using this hook woocommerce_register_post would simply things. This is my content of the custom-sum-captcha.php file: function custom_sum_captcha_generate_html() { $num1 = rand(1, 10); $num2 = rand(1, 10); $sum = $num1 + $num2; $html=”<p>Please solve the following math problem:</p>”; $html .= ‘<p>’ . $num1 . ‘ + ‘ . … Read more

HTML output from WordPress shortcode is wrapped in unexpected tags

Please try as below: function wp_reservations_shortcode($atts) { // remove auto paragraphs for shortcode content remove_filter(‘the_content’, ‘wpautop’); remove_filter(‘the_excerpt’, ‘wpautop’); ob_start(); ?> <section> <section class=”calendar-header”> <button id=”prev-month”>Prev</button> <div class=”current-date”>July 2024</div> <button id=”next-month”>Next</button> </section> <section class=”calendar-body”> <div class=”calendar-weekdays”></div> <div class=”calendar-days”></div> </section> </section> <?php $html = ob_get_clean(); // Re-enable automatic paragraphs add_filter(‘the_content’, ‘wpautop’); add_filter(‘the_excerpt’, ‘wpautop’); return $html; } add_shortcode(‘wp_reservations’, … Read more