November 11, 2015

WooCommerce get products by tags

function get_products_and_packages(){ $args = array( ‘post_type’      => ‘product’, ‘posts_per_page’ => -1, ‘product_tag’      => array(‘package’) ); $packages = get_posts($args); $currency = get_woocommerce_currency_symbol(); $arr = array(); if(!empty($packages)): foreach($packages as $package): $meta = get_post_meta($package->ID); $arr[$package->ID][‘name’] = $package->post_name; $arr[$package->ID][‘title’] = $package->post_title; $arr[$package->ID][‘price’] = current($meta[‘_regular_price’]); $arr[$package->ID][‘display_price’] = $currency.$arr[$package->ID][‘price’]; endforeach; endif; return $arr; }

November 10, 2015

Ready for TechHub Cycle 10th August 2015

What i wrote to apply? I have spent 9+ years in job and felt that the growth was retarded. Freelancing give you and opportunity to explore new technologies and tasks you love to do. Finally you get a unique identity on web which is an asset undoubtedly. In job i wasn’t able to relax even […]