{"version":3,"sources":["woo-feed-facebook-pixel.js"],"names":["$","wp","document","ready","fbq","body","on","event","fragments","cart_hash","product_id","button","data","post","length","response","fail","console","jQuery"],"mappings":"cAAA,SAACA,EAAAC,GAEGD,EAAAE,UAAAC,MAAA,WAEQ,mBAAAC,KADPJ,EAAAA,KAAWG,MAAZE,GAAkBC,gBAAA,SAAUC,EAAAA,EAAAC,EAAAC,GACbL,EAAPM,EAAJC,KAA+BC,cACpBP,EAAAA,KAAMC,KAAIO,6BAAA,CAAkCL,WAAAA,IAAAA,KAC3CE,SAAaC,GACJG,EAAAC,EAAAA,QAA2CL,IAAAA,QAAAA,YAAAA,KAE5CK,KACKC,WACRC,QAAAA,IAAA,yBAXzB,CAGIC,OAAAjB","file":"woo-feed-facebook-pixel.min.js","sourcesContent":["(function($, wp) {\n\n \"use strict\";\n $(document).ready(function(){\n if( typeof fbq === \"function\" ){\n $(this.body).on( 'added_to_cart', function( event, fragments, cart_hash, button ){\n var product_id = button.data('product_id');\n wp.ajax.post('add_to_cart_facebook_pixel', {product_id: product_id})\n .done(function(response){\n if( response.length > 0 ) {\n fbq( 'track', 'AddToCart', response );\n }\n })\n .fail(function (){\n console.log( \"Request Failed!\" );\n });\n } );\n }\n });\n\n})(jQuery, wp);"]}