*/ class Rex_Feed_Template_Hatch extends Rex_Feed_Abstract_Template { protected function init_atts(){ $this->attributes = array( 'Required Information' => array( 'product_name' => 'Product Name', 'description' => 'Description', 'price' => 'Price', 'product_category' => 'Product category', 'product_url' => 'Product URL', 'ean_upc' => 'EAN/UPC', 'brand' => 'Brand', 'stock' => 'Stock', 'availability' => 'Availability', ), 'Additional Information' => array( 'mpn' => 'MPN', 'product_id' => 'Product ID', 'image_url' => 'Image URL', 'promo_text' => 'Promo Text', ), 'Recommended Information' => array( 'review_score' => 'Review Score', 'review_count' => 'Review Count', ), ); } protected function init_default_template_mappings(){ $this->template_mappings = array( array( 'attr' => 'product_name', 'type' => 'meta', 'meta_key' => 'title', 'st_value' => '', 'prefix' => '', 'suffix' => '', 'escape' => 'default', 'limit' => 0, ), array( 'attr' => 'description', 'type' => 'meta', 'meta_key' => 'description', 'st_value' => '', 'prefix' => '', 'suffix' => '', 'escape' => 'default', 'limit' => 0, ), array( 'attr' => 'price', 'type' => 'meta', 'meta_key' => 'price', 'st_value' => '', 'prefix' => '', 'suffix' => ' '.get_option('woocommerce_currency'), 'escape' => 'default', 'limit' => 0, ), array( 'attr' => 'product_category', 'type' => 'meta', 'meta_key' => 'product_cats', 'st_value' => '', 'prefix' => '', 'suffix' => '', 'escape' => 'default', 'limit' => 0, ), array( 'attr' => 'product_url', 'type' => 'meta', 'meta_key' => 'featured_image', 'st_value' => '', 'prefix' => '', 'suffix' => '', 'escape' => 'default', 'limit' => 0, ), array( 'attr' => 'ean_upc', 'type' => 'static', 'meta_key' => '', 'st_value' => '', 'prefix' => '', 'suffix' => '', 'escape' => 'default', 'limit' => 0, ), array( 'attr' => 'brand', 'type' => 'static', 'meta_key' => '', 'st_value' => '', 'prefix' => '', 'suffix' => '', 'escape' => 'default', 'limit' => 0, ), array( 'attr' => 'stock', 'type' => 'meta', 'meta_key' => 'in_stock', 'st_value' => '', 'prefix' => '', 'suffix' => '', 'escape' => 'default', 'limit' => 0, ), array( 'attr' => 'availability', 'type' => 'meta', 'meta_key' => 'availability', 'st_value' => '', 'prefix' => '', 'suffix' => '', 'escape' => 'default', 'limit' => 0, ), ); } }