I'm trying to inject some text in my description ending. Is it possible with filter?
Or do i need to do this via child theme? Been trying to find the hook for description but can only find one for short description. Example:
This is a description.
Just some sample text to fill the description out.
What i want is to inject "This is the last line in the description" So the hole description would look like this.
This is a description.
Just some sample text to fill the description out.
This is the last line in the description
The code i have for injecting text before short description is this:
add_filter( 'woocommerce_short_description', 'single_product_short_descriptions', 10, 1 );
function single_product_short_descriptions( $post_excerpt ){
global $product;
if ( is_single( $product->id ) )
$post_excerpt = '<div class="product-message"><p>' . __( "Article only available in the store.", "woocommerce" ) . '</p></div>' . $post_excerpt;
return $post_excerpt;
}