Reply To: Questions

#98885
Tom Anbinder
Moderator
Plugin Support

Hi Yinon,

1. Regarding “… it wouldn’t keep the line brakes and would show it as continuous text…” – please change in the snippet I posted before:
from:

echo '<p>' . $product->get_short_description() . '</p>';

to:

echo wpautop( $product->get_short_description() );

2. Regarding “… when a product is out of stock, the button text remain the same…” – I will consider adding this option to the plugin – meanwhile please use this snippet:

add_action( 'woocommerce_product_add_to_cart_text', 'change_add_to_cart_text_for_out_of_stock', PHP_INT_MAX, 2 );
if ( ! function_exists( 'change_add_to_cart_text_for_out_of_stock' ) ) {
    /**
     * change_add_to_cart_text_for_out_of_stock.
     */
    function change_add_to_cart_text_for_out_of_stock( $text, $product ) {
        return ( ! $product->is_in_stock() ? 'Out of stock' : $text );
    }
}

3. Regarding “… in the plugin setting there is a message on product end…” – this message will be shown on the single product page when campaign time ends or goal is reached (and also “Add to cart” will be removed). Please make sure that you have checked End On Time Ended and/or End On Goal Reached checkboxes in plugin settings (in “WooCommerce > Settings > Crowdfunding > General > Ending Options”).

Hope that helps.

P.S. If you like the plugin, please consider leaving us a rating.