Changeset 3027244
- Timestamp:
- 01/26/2024 09:07:22 AM (2 years ago)
- Location:
- popify-sales-pop-ups
- Files:
-
- 25 added
- 2 edited
-
tags/1.0.4 (added)
-
tags/1.0.4/assets (added)
-
tags/1.0.4/assets/banner-1544x500.gif (added)
-
tags/1.0.4/assets/banner-772x250.gif (added)
-
tags/1.0.4/assets/css (added)
-
tags/1.0.4/assets/css/style.css (added)
-
tags/1.0.4/assets/icon-1200.png (added)
-
tags/1.0.4/assets/icon-128x128.png (added)
-
tags/1.0.4/assets/icon-256x256.png (added)
-
tags/1.0.4/assets/images (added)
-
tags/1.0.4/assets/images/popifyLogo.png (added)
-
tags/1.0.4/assets/images/popify_icon.png (added)
-
tags/1.0.4/assets/images/popify_icon_old.png (added)
-
tags/1.0.4/assets/images/popify_logo.png (added)
-
tags/1.0.4/assets/js (added)
-
tags/1.0.4/assets/js/script.js (added)
-
tags/1.0.4/assets/screenshot-1.png (added)
-
tags/1.0.4/assets/screenshot-2.png (added)
-
tags/1.0.4/assets/screenshot-3.png (added)
-
tags/1.0.4/assets/screenshot-4.png (added)
-
tags/1.0.4/assets/screenshot-5.png (added)
-
tags/1.0.4/popify.php (added)
-
tags/1.0.4/readme.txt (added)
-
tags/1.0.4/views (added)
-
tags/1.0.4/views/popify_admin_page.php (added)
-
trunk/popify.php (modified) (12 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
popify-sales-pop-ups/trunk/popify.php
r3016644 r3027244 8 8 * Plugin Name: Popify Sales Pop Ups 9 9 * Description: Popify is the best free tool for Social Proof, Recent Sales Popup, Customer Reviews Pop up, Recent Orders and Abandoned cart recovery. 10 * Version: 1.0. 310 * Version: 1.0.4 11 11 * Author: Popify 12 12 * Author URI: https://popify.app … … 20 20 21 21 define("POPIFY_API_URL", "https://app.popify.app"); 22 define('POPIFY_VERSION', '1.0 ');22 define('POPIFY_VERSION', '1.0.4'); 23 23 define('POPIFY_PATH', dirname(__FILE__)); 24 24 define('POPIFY_FOLDER', basename(POPIFY_PATH)); … … 26 26 define('POPIFY_API_KEY', get_option('popify_api_key')); 27 27 define("POPIFY_DEVELOPMENT", (stripos(POPIFY_API_URL, "dev.popify") !== false ? "dev" : "")); 28 define("POPIFY_DEBUG", true);28 define("POPIFY_DEBUG", false); 29 29 30 30 register_activation_hook(__FILE__, 'popify_activation_hook'); … … 34 34 add_action('admin_menu', 'popify_admin_menu'); 35 35 add_action('wp_head', 'popify_script'); 36 add_action("wp_ajax_nopriv_popify_installation","popify_installation");37 add_action("wp_ajax_popify_installation","popify_installation");38 36 39 37 function popify_activation_hook() … … 51 49 if ($response['success'] > 0) 52 50 { 53 popify_log('api key: '.$response['api_key'], get_site_url()); 54 popify_log((!get_option('popify_api_key') ? "yes" : "no"), get_site_url()); 51 55 52 56 53 if (!get_option('popify_api_key')) … … 58 55 add_option('popify_api_key',$response['api_key']); 59 56 60 popify_log($response['app_name']." ".$response['user_id']." ".$response['scope'], get_site_url());57 61 58 62 59 if (class_exists("WC_Auth")) … … 87 84 } 88 85 89 popify_log('after auth');86 90 87 } 91 88 else … … 96 93 else 97 94 { 98 popify_log('invalid response - api key', get_site_url());95 99 96 100 97 if (!get_option('popify_error')) … … 107 104 else 108 105 { 109 popify_log('error getting response - api key', get_site_url());106 110 107 111 108 if (!get_option('popify_error')) … … 215 212 'body' => json_encode($data), 216 213 ); 217 popify_log('sending request', $url);214 218 215 $response = wp_remote_post($url, $data); 219 popify_log('got response', $url);216 220 217 221 218 if (!is_wp_error($response)) … … 230 227 catch(Exception $err) 231 228 { 232 popify_handle_error('failed sending request', $err, $data); 233 } 234 } 235 236 function popify_log($message, $data = null) 237 { 238 $log = null; 239 240 if (isset($data)) 241 { 242 $log = "\n[Popify] " . $message . ":\n" . print_r($data, true); 243 } 244 else 245 { 246 $log = "\n[Popify] " . $message; 247 } 248 error_log($log); 249 250 if (POPIFY_DEBUG) 251 { 252 $plugin_log_file = plugin_dir_path(__FILE__).'debug.log'; 253 error_log($log."\n", 3, $plugin_log_file); 254 } 255 } 256 257 function popify_handle_error($message, $err, $data = null) 258 { 259 popify_log($message, $err); 229 if(POPIFY_DEBUG) 230 { 231 echo $err; 232 } 233 } 260 234 } 261 235 … … 338 312 } 339 313 340 function popify_installation()341 {342 if (in_array('woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins'))) && !get_option('popify_error'))343 {344 $json['success'] = 1;345 $json['api_key'] = get_option('popify_api_key');346 }347 else348 {349 $json["success"] = 0;350 }351 352 wp_send_json($json);353 wp_die();354 }355 314 356 315 ?> -
popify-sales-pop-ups/trunk/readme.txt
r3016644 r3027244 6 6 Requires PHP: 5.4 7 7 Tested up to: 6.4.2 8 Stable tag: 1.0. 38 Stable tag: 1.0.4 9 9 Plugin URI: https://popify.app 10 10 License: proprietary
Note: See TracChangeset
for help on using the changeset viewer.