WC_REST_Products_Controller::get_objects()
Get objects.
Метод класса: WC_REST_Products_Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_objects( $query_args );
- $query_args(массив) (обязательный)
- Query args.
Код WC_REST_Products_Controller::get_objects() WC REST Products Controller::get objects WC 7.7.2
protected function get_objects( $query_args ) { // Add filters for search criteria in product postmeta via the lookup table. if ( ! empty( $this->search_sku_in_product_lookup_table ) ) { add_filter( 'posts_join', array( $this, 'add_search_criteria_to_wp_query_join' ) ); add_filter( 'posts_where', array( $this, 'add_search_criteria_to_wp_query_where' ) ); } $result = parent::get_objects( $query_args ); // Remove filters for search criteria in product postmeta via the lookup table. if ( ! empty( $this->search_sku_in_product_lookup_table ) ) { remove_filter( 'posts_join', array( $this, 'add_search_criteria_to_wp_query_join' ) ); remove_filter( 'posts_where', array( $this, 'add_search_criteria_to_wp_query_where' ) ); $this->search_sku_in_product_lookup_table = ''; } return $result; }