This topic has 4 replies, 2 voices, and was last updated 7 years, 4 months ago ago by Rose Tyler
Hi, since the last update of your theme, the official Wooocommerce Waitlist no longer works. The button to apply for the waitlist doesn’t show on the product page, however it works with products that have variations. If I change to a default theme it works, so it’s something in your theme.
I already contacted with the plugin authors and they told to contact with you.
Hello,
Could you please provide wp-admin access in Private Content?
Regards,
Rose Tyler.
Hi Rose, finally I managed to fix it by myself. The problem was caused by this template:
/woopress/woocommerce/single-product/add-to-cart/simple.php
So I compared it with the original template in:
/plugins/woocommerce/templates/single-product/add-to-cart/simple.php
And replaced this code:
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
global $woocommerce, $product;
if ( ! $product->is_purchasable() ) return;
?>
<?php
// Availability
$availability = $product->get_availability();
$availability_html = empty( $availability['availability'] ) ? '' : '<p class="stock ' . esc_attr( $availability['class'] ) . '">' . esc_html( $availability['availability'] ) . '</p>';
echo apply_filters( 'woocommerce_stock_html', $availability_html, $availability['availability'], $product );
?>
<?php if ( $product->is_in_stock() ) : ?>
With this one:
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
global $product;
if ( ! $product->is_purchasable() ) {
return;
}
echo wc_get_stock_html( $product );
if ( $product->is_in_stock() ) : ?>
And that fixed it! I made the change in my child theme.
Hope this helps someone else with the same problem 🙂
Hello,
We are glad that you sorted out!
Regards,
Rose Tyler.
You must be logged in to reply to this topic.Log in/Sign up