Search code examples
phpwordpresswoocommercegravity-forms-plugingravityforms

WooCommerce: Name of short description meta field


I want to populate the short description field of a WooCommerce product with Gravity Forms. Unfortunately I couldn't figure out the name of the meta field(?).

Every other meta field works fine. I've checked the code and some docs to find the correct name but I couldn't find it.

I tried the following: excerpt, postexcerpt, post_excerpt. In the backend code the field's name is excerpt. To use the field's name works for every other meta field.


Solution

  • This snippet will make the short description / excerpt show up as a mappable field:

    add_filter( 'gform_advancedpostcreation_excerpt', 'enable_excerpt', 10, 1 );
    function enable_excerpt( $enable_excerpt ){
        return true;
    }
    

    https://docs.gravityforms.com/gform_advancedpostcreation_excerpt/#examples