/**
* HOFO Meta Pixel + WooCommerce Standard Events
* Pixel ID: 2627063111105437
*
* Events:
* PageView, ViewContent, AddToCart,
* InitiateCheckout, Purchase
*
* Add through the Code Snippets plugin.
* Do not include an opening PHP tag.
*/
// 1. META PIXEL BASE CODE
add_action('wp_head', 'hofo_meta_pixel_base', 20);
function hofo_meta_pixel_base() {
if (is_admin()) return;
?>
session) return;
$product = wc_get_product($variation_id ?: $product_id);
if (!$product) return;
$price = (float) wc_get_price_to_display($product);
$quantity = max(1, (int) $quantity);
$events = WC()->session->get('hofo_meta_pending_cart_events', []);
if (!is_array($events)) {
$events = [];
}
$events[] = [
'id' => (string) $product_id,
'quantity' => $quantity,
'value' => round($price * $quantity, 2),
'currency' => get_woocommerce_currency()
];
WC()->session->set('hofo_meta_pending_cart_events', $events);
}
// 3. OUTPUT WOOCOMMERCE EVENTS
add_action('wp_footer', 'hofo_meta_woocommerce_events', 30);
function hofo_meta_woocommerce_events() {
if (is_admin() || !function_exists('WC')) return;
$events = [];
$currency = get_woocommerce_currency();
$session = WC()->session;
// ADD TO CART
if ($session) {
$pending = $session->get('hofo_meta_pending_cart_events', []);
if (is_array($pending)) {
foreach ($pending as $item) {
$events[] = [
'name' => 'AddToCart',
'params' => [
'content_ids' => [$item['id']],
'content_type' => 'product',
'contents' => [[
'id' => $item['id'],
'quantity' => $item['quantity']
]],
'value' => $item['value'],
'currency' => $item['currency']
]
];
}
}
$session->set('hofo_meta_pending_cart_events', []);
}
// VIEW CONTENT
if (function_exists('is_product') && is_product()) {
$product = wc_get_product(get_queried_object_id());
if ($product) {
$product_id = (string) $product->get_id();
$price = (float) wc_get_price_to_display($product);
$events[] = [
'name' => 'ViewContent',
'params' => [
'content_ids' => [$product_id],
'content_type' => 'product',
'contents' => [[
'id' => $product_id,
'quantity' => 1
]],
'value' => round($price, 2),
'currency' => $currency
]
];
}
}
// INITIATE CHECKOUT
if (
function_exists('is_checkout') &&
is_checkout() &&
!is_order_received_page() &&
WC()->cart &&
!WC()->cart->is_empty()
) {
$cart_hash = WC()->cart->get_cart_hash();
$previous_hash = $session
? $session->get('hofo_meta_checkout_hash')
: '';
if ($cart_hash && $cart_hash !== $previous_hash) {
$content_ids = [];
$contents = [];
$num_items = 0;
foreach (WC()->cart->get_cart() as $cart_item) {
$id = (string) $cart_item['product_id'];
$qty = (int) $cart_item['quantity'];
$content_ids[] = $id;
$contents[] = [
'id' => $id,
'quantity' => $qty
];
$num_items += $qty;
}
$events[] = [
'name' => 'InitiateCheckout',
'params' => [
'content_ids' => array_values(array_unique($content_ids)),
'content_type' => 'product',
'contents' => $contents,
'num_items' => $num_items,
'value' => (float) WC()->cart->get_total('edit'),
'currency' => $currency
]
];
if ($session) {
$session->set('hofo_meta_checkout_hash', $cart_hash);
}
}
}
// PURCHASE
if (
function_exists('is_order_received_page') &&
is_order_received_page()
) {
$order_id = absint(get_query_var('order-received'));
$order_key = isset($_GET['key'])
? wc_clean(wp_unslash($_GET['key']))
: '';
$order = wc_get_order($order_id);
if (
$order &&
$order_key &&
hash_equals($order->get_order_key(), $order_key) &&
!$order->has_status(['failed', 'cancelled', 'refunded']) &&
$order->get_meta('_hofo_meta_purchase_pixel_sent') !== 'yes'
) {
$content_ids = [];
$contents = [];
$num_items = 0;
foreach ($order->get_items('line_item') as $item) {
$id = (string) $item->get_product_id();
$qty = (int) $item->get_quantity();
$content_ids[] = $id;
$contents[] = [
'id' => $id,
'quantity' => $qty
];
$num_items += $qty;
}
$events[] = [
'name' => 'Purchase',
'params' => [
'content_ids' => array_values(array_unique($content_ids)),
'content_type' => 'product',
'contents' => $contents,
'num_items' => $num_items,
'value' => (float) $order->get_total(),
'currency' => $order->get_currency(),
'order_id' => (string) $order->get_id()
]
];
// Prevent repeat Purchase events on page refresh.
$order->update_meta_data(
'_hofo_meta_purchase_pixel_sent',
'yes'
);
$order->save();
}
}
// SEND EVENTS TO META
if (!empty($events)) {
$json = wp_json_encode(
$events,
JSON_HEX_TAG |
JSON_HEX_APOS |
JSON_HEX_QUOT |
JSON_HEX_AMP
);
echo '';
}
}
Skip to content
It’s Finally here…
ORGANIC buckwheat PRODUCTS
FROM hIMALAYAS Organic & kARAKORUM MOUNTAINS OF gILGIT BALTISTAN
Shop Now
The premium quality Shilajit from Mighty Himalayas and Karakorum mountains of Gilgit Baltistan
SHOP NOW
FOXTAIL MILLE T
Directly from the Himalayas Organic Villages of Gilgit Baltistan
Shop NOW
INTRODUCING HIMALAYAN PREMIUM DRIED FRUITS
Our Dried Fruits are strictly sourced from the Organic Villages of Himalayas and Karkorum mountains of Gilgit Balt istan.
SHOP NOW
Recipes
All about tasty cooking & delicious recipes. New Recipes are added frequently.
read now
OUR BLOG
Read our blog to know all about Himalayas Organic Foods, Gluten Free Foods, Healthy Diets and the amazing Products we bring to you.
Read NOW
CHECK OUR LATEST PRODUCTS
₨ 1,699.00 Original price was: ₨1,699.00. ₨ 1,549.00Current price is: ₨1,549.00.
₨ 1,999.00 Original price was: ₨1,999.00. ₨ 1,649.00Current price is: ₨1,649.00.
₨ 11,500.00 Original price was: ₨11,500.00. ₨ 10,499.00Current price is: ₨10,499.00.
₨ 5,700.00 Original price was: ₨5,700.00. ₨ 5,100.00Current price is: ₨5,100.00.
₨ 5,900.00 Original price was: ₨5,900.00. ₨ 5,200.00Current price is: ₨5,200.00.
Rated 5.00 out of 5
₨ 4,500.00 Original price was: ₨4,500.00. ₨ 3,950.00Current price is: ₨3,950.00.
Rated 5.00 out of 5
₨ 1,799.00 Original price was: ₨1,799.00. ₨ 1,555.00Current price is: ₨1,555.00.
₨ 1,799.00 Original price was: ₨1,799.00. ₨ 1,499.00Current price is: ₨1,499.00.
Best Selling Products
Rated 4.60 out of 5
₨ 1,800.00 Original price was: ₨1,800.00. ₨ 1,485.00Current price is: ₨1,485.00.
Rated 5.00 out of 5
₨ 1,800.00 Original price was: ₨1,800.00. ₨ 1,495.00Current price is: ₨1,495.00.
Rated 4.70 out of 5
₨ 899.00 Original price was: ₨899.00. ₨ 835.00Current price is: ₨835.00.
Rated 4.82 out of 5
₨ 1,689.00
Rated 5.00 out of 5
₨ 1,725.00
Rated 5.00 out of 5
₨ 1,699.00 Original price was: ₨1,699.00. ₨ 1,625.00Current price is: ₨1,625.00.
Rated 5.00 out of 5
₨ 4,000.00 Original price was: ₨4,000.00. ₨ 3,799.00Current price is: ₨3,799.00.
Rated 5.00 out of 5
₨ 875.00
Free Shipping In certain cities
GET FREE SHIPPING in Rawalpindi Islamabad on orders above Rs. 2700.
100% guaranteed Organic
ALL THE PRODUCTS ARE 100% ORGANIC FROM THE HIGH ALTITUDE ORGANIC VILLAGES OF GILGIT BALTISTAN.
No TAxes or Duty Fees!
THERE ARE ABSOLUTELY NO SALES TAXES OR HIDDEN CHARGES OF ANY KIND.
LATEST BLOGS & RECIPES
I am really happy with the product quality as promised,customer service and your new partnered delivery system is perfect! Thank you and keep your services up to the same standard!
Nabeel Rehmani
I can’t believe it is a local Pakistani product. Amazing product. Please keep it up. Don’t ever compromise on the quality. I am a regular buyer of your products NOW!!
Shanoor Ali
I’m impressed by the superfast delivery and the quality of your products….Himalayas organic,fresh and soothing for the gut?
Shafaq Hammad