shopp_index_product_properties

filters the properties of the Product object used for indexing.

add_filter( 'shopp_index_product_properties', [callback] )

@param array $properties the properties of the Product object used for indexing.

Description

filters the properties of the Product object used for indexing.

Example

// register filter callback
add_filter('shopp_index_product_properties', 'shopp_index_product_properties_filter');

// create filter function
function shopp_index_product_properties_filter( $properties ) {
    // defaults to "name","prices","summary","description","specs","categories","tags"
    // specify any additinoal string property of the Product object
    // or remove a particular property that isn not useful
    foreach ($properties as $i => $prop) {
        // don't use the description field
        if ( 'description' == $prop ) unset($properties[$i]);
    }
    return $properties;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar