Automattic\WooCommerce\Blocks\BlockTypes
AbstractProductGrid::get_schema_orderby
Get the schema for the orderby attribute.
Method of the class: AbstractProductGrid{}
No Hooks.
Returns
Array. Property definition of orderby attribute.
Usage
// protected - for code of main (parent) or child class $result = $this->get_schema_orderby();
AbstractProductGrid::get_schema_orderby() AbstractProductGrid::get schema orderby code WC 10.3.6
protected function get_schema_orderby() {
return array(
'type' => 'string',
'enum' => array( 'date', 'popularity', 'price_asc', 'price_desc', 'rating', 'title', 'menu_order' ),
'default' => 'date',
);
}