Using Code Tag To Generate WooCommerce Products

It is a fact that WooCommerce is of the best wordpress plugin for

online shop or any e-commerce and millions of wordpress user have

installed it for use.

Should in case there is willingness to generate with the use of html

code or tag, that should not be a problem. According to the article on, such aim can be achieved by using

the code below:-

function get_products_and_packages


$args = array(

'post_type' => 'product',

'posts_per_page' => -1,

'product_tag' => array



$packages = get_posts($args);

$currency =


$arr = array();


foreach($packages as $package):

$meta = get_post_meta($package-


$arr[$package->ID]['name'] =


$arr[$package->ID]['title'] =


$arr[$package->ID]['price'] =



= $currency.$arr[$package->ID]




return $arr;



Related Posts Plugin for WordPress, Blogger...


Huge Income Via Native Ads [Adnow]

Join The Best Adsense Alternative [Revenuehits]

Earn More Than 10% In Referral Revenue [Infolinks]

Get 5% From Publishers’ Revenue You Refer [Infolinks]

10% lifetime revshare from your referred members earnings[PopMyAds]

Easy Way To Receive Or Send Money[Skrill]

Quick Approval Native Ads Network[PayClick]

Earn While You Snore [Exoclick]


Popular Posts