/** * 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 ''; } }

Showing 1–12 of 39 results

This is the place where you can find all our products and buy also.

Sale!
Original price was: ₨1,699.00.Current price is: ₨1,549.00.
Sale!
Original price was: ₨4,500.00.Current price is: ₨3,950.00.
Sale!
Original price was: ₨1,999.00.Current price is: ₨1,649.00.
Sale!
Sale!
Original price was: ₨11,500.00.Current price is: ₨10,499.00.
Sale!
Sale!
Original price was: ₨1,199.00.Current price is: ₨995.00.
Sale!
Original price was: ₨1,500.00.Current price is: ₨1,299.00.
Sale!
Original price was: ₨2,299.00.Current price is: ₨1,849.00.
Sale!
Original price was: ₨1,525.00.Current price is: ₨1,499.00.
Sale!
Original price was: ₨1,800.00.Current price is: ₨1,485.00.