Shortcode on product page
-
Hello,
I need to display a waitlist form in a custom popup on a product page. The popup is shown after clicking on the corresponding section informing about the status of the product. In case the product is not available, I display a shortcode with the form in it.
The problem is that after clicking “Add to waitlist” the form in the popup loads endlessly, but the form which shows automatically under the product price informs that the user has been added to the waitlist.
I am attaching a screenshot due to the fact that I am still building the site locally.

elseif ($availability['class'] === 'out-of-stock') {
echo '<p class="stock out-of-stock">' . esc_html__('Niedostępny', 'pressmatic') . '</p>';
// Dodatkowe informacje o dostawie
echo '<div class="delivery-info">';
echo '<p>' . esc_html__('Produkt jest aktualnie niedostępny. Jeśli chcesz zostać poinformowany o jego ponownej dostępności wypełnij poniższy formularz.', 'pressmatic') . '</p>';
echo '</div>';
echo '<div class="product-contact-form">';
// print_r($product);
echo do_shortcode('[ywcwtl_form product_id="'. esc_attr($product->id) .'"]');
echo '</div>';
}
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Shortcode on product page’ is closed to new replies.
