Prefill Woocommerce Short Description on Post Page

Viewed 72

I'm trying to pre-fill the short description when adding a new product. I've figured out how to do it with the main description as shown below, but cannot figure out the short description.

add_filter( 'default_content', 'my_editor_content' );

function my_editor_content( $content ) {

    $content = "This is some custom content I'm adding to the post editor because I hate re-typing it.";

    return $content;
}

I'm suspecting it is similar but with a different hook instead of "default_content" any ideas?

1 Answers

Figured it out. After reading around I realized that Woocommerce uses WordPress's excerpt for the short description. So after some trial and error I found that the hook I was looking for is "default_excerpt". Does the trick!

Related