Is it possible to add Woocommerce Product Default Description for all new added product pages in the backend product description area as a default text for example ( free of charge ) or a default function which will generate a certain action but only for the products who doesn’t have a product description value
All that is needed is to get the description have a default added value for the new added products in the description below
Can anyone help in this ?
I found this which do the magic but for the product short description, but i want it to the product description itself
add_action( 'woocommerce_single_product_summary', 'bbloomer_echo_short_desc_if_empty', 21 );
function bbloomer_echo_short_desc_if_empty() {
global $post;
if ( empty ( $post->post_excerpt ) ) {
$post_excerpt = '<p class="default-short-desc">';
$post_excerpt .= 'This is the default, global, short description.<br>It will show if <b>no short description has been entered!</b>';
$post_excerpt .= '</p>';
echo $post_excerpt;
}
}
2
Answers
something like above should work.
Try this: