{"version":3,"sources":["woo-feed-facebook-pixel.js"],"names":["$","wp","document","ready","fbq","body","on","event","fragments","cart_hash","product_id","button","data","post","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,IAAAA,EAAPM,EAAJC,KAA+BC,cACpBP,EAAAA,KAAMC,KAAIO,6BAAA,CAAkCL,WAAAA,IAAAA,KAC3CE,SAAaC,GACJP,IAAAA,QAAA,YAAAU,KAAyCC,KAC5CA,WACYC,QAAAA,IAAA,yBATtC,CAGIC,OAAAhB","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 fbq( 'track', 'AddToCart', response );\n })\n .fail(function (){\n console.log( \"Request Failed!\" );\n });\n } );\n }\n });\n\n})(jQuery, wp);"]}