/** * Finds item specified by state. * * @param array $state State of the product to be found. * * @return \Jigoshop\Entity\Product Item found. */ public function findForState(array $state) { $post = $this->wp->getPost($state['id']); $product = $this->factory->fetch($post); $product->restoreState($state); return $this->wp->applyFilters('jigoshop\\service\\product\\find_for_state', $product, $state); }