/** * Convert WP queried Shopp product post types to a Shopp Product * * @author Jonathan Davis * @since 1.2 * * @param object $wp The main WP object from the 'wp' action * @return void **/ public function loaded(WP $wp) { if (!is_shopp_product()) { return; } // Get the loaded object (a Shopp product post type) global $wp_the_query; $object = $wp_the_query->get_queried_object(); // Populate so we don't have to req-uery $Product = new ShoppProduct(); $Product->populate($object); ShoppProduct($Product); $this->Requested = $Product; }