{"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":"aAAA,CAAA,SAACA,EAAUC,G,EAEPC,QAAAA,EAAYC,MAAA,WAEM,YAAd,OAAIC,K,OADID,IAAKE,EAAAA,GAACC,gBAAA,SAAUC,EAAAA,EAAAC,EAAAC,GACbL,EAAGM,EAAeC,KAAEC,YAAA,E,OACdN,KAAIO,6BAAA,C,WAAkCL,C,QAC3CE,SAAaC,GACJG,E,EAAAC,Q,YAA2CL,YAAAA,CAAAA,C,QAGvCM,W,QACTC,IAAA,iBAAA,C,KAOpB,CAEH,EAFIC,OAACjB,EAAA","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);"]}