product = new PLLWC_REST_Product(); $this->order = new PLLWC_REST_Order(); } /** * Removes the translations from the response when querying orders. * * @since 0.9 * * @param array $args Options passed to PLL_REST_Post. * @return array */ public function post_types( $args ) { $args['product_variation'] = array(); $args['shop_order']['translations'] = false; return $args; } /** * Adds the language and translations in the response when querying product attributes terms. * * @since 0.9 * * @param array $args Options passed to PLL_REST_Term. * @return array */ public function taxonomies( $args ) { $args['product_cat'] = array(); $args['product_tag'] = array(); $args['product_attribute_term']['filters'] = false; return $args; } }