Support » Plugin: Pixel Caffeine » Variation ID/SKU not showing in “content_ids”

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Antonino Scarfì

    (@antoscarface)

    Hi,

    could you please post your website URL where I might be able to see the issue?

    Thanks.

    Hi,

    Here is our site URL and you can see only the Main Product SKU added to the “content_ids” and not the Variations.

    Thanks

    Plugin Author Antonino Scarfì

    (@antoscarface)

    Hi,

    I cannot see the URL linked to your reply, could you please try again?

    Hi,

    Not sure how its get removed and here it is – https://discount.com.au/product/glazier-vanity-unit/.

    Thanks

    Plugin Author Antonino Scarfì

    (@antoscarface)

    Thank you for sharing your website.

    You can fix your case by adding an hook in your website code. Here the hook:

    
    add_filter('aepc_event_parameters', function($params, $event) {
    	$product = wc_get_product();
    
    	if ( 'ViewContent' === $event && ! empty($product) && $product->is_type('variation') ) {
    		$params['content_ids'] = [$product->get_id()];
    	}
    	
    	return $params;
    }, 10, 2);
    

    Place this at the end of the functions.php file of your current theme (or better child if it’s not already), or in a new plugin.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.