Changeset 2591731
- Timestamp:
- 08/31/2021 08:57:22 PM (5 years ago)
- Location:
- froged
- Files:
-
- 8 added
- 2 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/froged-admin.php (added)
-
tags/1.1.0/froged-conf.php (added)
-
tags/1.1.0/index.php (added)
-
tags/1.1.0/js (added)
-
tags/1.1.0/js/contactform.js (added)
-
tags/1.1.0/readme.txt (added)
-
tags/1.1.0/uninstall.php (added)
-
trunk/froged-conf.php (modified) (9 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
froged/trunk/froged-conf.php
r2591384 r2591731 4 4 Plugin URI: https://app.froged.com/?utm_source=wordpress_plugin 5 5 Description: Froged. Live Chat, Email Campaigns, Lead Generation, and much more. 6 Version: 1. 0.96 Version: 1.1.0 7 7 Requires at least: 3.0 8 8 Tested up to: 5.8 … … 39 39 if (!empty($id) && (!isset($options['include_snippet']) != '1' || $options['include_snippet']) ){ 40 40 add_action( 'wp_head', 'froged_woo_header', 102 ); 41 add_action('wp_login', 'froged_login', 10,2);42 add_action('wp_logout', 'froged_logout' );43 add_action('user_register', 'froged_on_sign_up' );41 add_action('wp_login', 'froged_login',30,2); 42 add_action('wp_logout', 'froged_logout',30); 43 add_action('user_register', 'froged_on_sign_up',30); 44 44 add_action( 'wp_enqueue_scripts', 'froged_scripts' ); 45 add_filter( 'http_headers_useragent', 'froged_setUserAgent',30,2); 45 46 if ( class_exists( 'WooCommerce' ) ) { 46 47 47 add_action('woocommerce_add_to_cart','froged_addtocart', 10, 6);48 add_action('woocommerce_remove_cart_item','froged_removefromcart', 10, 6);49 add_action('wp_footer', 'froged_add_to_wishlist' );50 add_action('wp_ajax_getDataWhislist', 'froged_getDataWhislist' );51 add_action('wp_ajax_nopriv_getDataWhislist', 'froged_getDataWhislist' );48 add_action('woocommerce_add_to_cart','froged_addtocart',30, 6); 49 add_action('woocommerce_remove_cart_item','froged_removefromcart',30, 6); 50 add_action('wp_footer', 'froged_add_to_wishlist',30); 51 add_action('wp_ajax_getDataWhislist', 'froged_getDataWhislist',30); 52 add_action('wp_ajax_nopriv_getDataWhislist', 'froged_getDataWhislist',30); 52 53 } 53 54 } … … 121 122 $user_agent = $_SERVER['HTTP_USER_AGENT']; 122 123 $actual_url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; 123 $info = array('url' => $actual_url, 'referrer' => isset($referer) ? '' : $referer, 'userAgent' => $user_agent );124 $info = array('url' => $actual_url, 'referrer' => isset($referer) ? $referer : '' , 'userAgent' => $user_agent ); 124 125 $response = wp_remote_post( $url, array( 125 126 'method' => 'POST', … … 130 131 'headers' => array(), 131 132 'body' => array('meta' => $meta, 'info' => $info), 132 'cookies' => array())); 133 } 133 'cookies' => array())); 134 } 135 } 136 137 function froged_setUserAgent ($agent,$url){ 138 return 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36'; 134 139 } 135 140 … … 221 226 if( is_user_logged_in() ) 222 227 { 223 $current_user = wp_get_current_user(); 224 228 $current_user = wp_get_current_user(); 225 229 $username = $current_user->user_login; 226 230 $userId = $current_user->ID; … … 301 305 $product_category = 'None'; 302 306 } 303 if($product-> price!=$product->regular_price){307 if($product->get_price()!=$product->get_regular_price()){ 304 308 ?> 305 309 <script type="text/javascript"> 306 310 (function($){ 307 311 Froged('track', 'on_view_promotion', { 308 promotions: '<?php echo "sku: ".$product->get_sku()." - price offer: ".$product-> price." ".get_option('woocommerce_currency'); ?>',312 promotions: '<?php echo "sku: ".$product->get_sku()." - price offer: ".$product->get_price()." ".get_option('woocommerce_currency'); ?>', 309 313 }); 310 314 })(jQuery); … … 320 324 item_id: ['<?php echo (isset($options['product_ref']) && $options['product_ref']) ? $content_id : $content_sku; ?>'], 321 325 value: <?php echo (isset($options['taxes']) && $options['taxes']) ? number_format($price,2,'.','') : number_format($price_ex,2,'.',''); ?>, 322 currency:'<?php echo $options['currency'];?>'326 currency:'<?php echo get_option('woocommerce_currency');?>' 323 327 }); 324 328 </script> … … 373 377 items: [<?php echo (isset($options['product_ref']) && $options['product_ref']) ? implode( ', ',$content_id) : implode( ', ',$content_sku); ?>], 374 378 value: <?php echo (isset($options['taxes']) && $options['taxes']) ? number_format($cart_total,2,'.','') : number_format($cart_total_ex,2,'.',''); ?>, 375 currency:'<?php echo $options['currency'];?>'379 currency:'<?php echo get_option('woocommerce_currency');?>' 376 380 }); 377 381 </script> … … 406 410 items: [<?php echo (isset($options['product_ref']) && $options['product_ref']) ? implode( ', ',$content_id) : implode( ', ',$content_sku); ?>], 407 411 value: <?php echo (isset($options['taxes']) && $options['taxes']) ? number_format($order_total,2,'.','') : number_format($order_total_ex,2,'.',''); ?>, 408 currency:'<?php echo $options['currency'];?>',412 currency:'<?php echo get_option('woocommerce_currency');?>', 409 413 transaction_id:'<?php echo $order_id;?>', 410 414 coupon:'<?php echo implode( ', ',$coupon);?>', -
froged/trunk/readme.txt
r2591384 r2591731 4 4 Requires at least: 3.0 5 5 Tested up to: 5.8 6 Stable tag: 1. 0.96 Stable tag: 1.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 133 133 134 134 * Performance improvements 135 136 = 1.1.0 = 137 138 * New events added - on_sign_up, on_login, on_logout, on_add_to_cart, on_remove_from_cart
Note: See TracChangeset
for help on using the changeset viewer.