Changeset 2076899
- Timestamp:
- 04/29/2019 11:34:08 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
optinmate/trunk/optinmate.php
r2075426 r2076899 36 36 define('OPTIN_WOO_MATE_PLUGIN_PATH', plugin_dir_path(__FILE__)); 37 37 define('OPTIN_WOO_MATE_PLUGIN_URL', plugin_dir_url(__FILE__)); 38 define('OPTIN_WOO_API_INSTALL_URL', 'http:// optinmate.com/api/woocommerce/install');39 define('OPTIN_WOO_API_ACCOUNT_URL', 'http:// optinmate.com/woocommerce/iframe?account=');38 define('OPTIN_WOO_API_INSTALL_URL', 'http://my.optinmate.com/api/woocommerce/install'); 39 define('OPTIN_WOO_API_ACCOUNT_URL', 'http://my.optinmate.com/woocommerce/iframe?account='); 40 40 define('OPTIN_FRONTEND_JS_PATH', 'https://my.optinmate.com/'); 41 41 if (is_admin()) { … … 103 103 */ 104 104 $response_decoded = json_decode($response['body'], true); 105 106 $optin_account_id = intval($response_decoded['account_id']); 107 if (!$optin_account_id) { 108 $optin_account_id = ''; 105 106 if(isset($response_decoded['account_id']) && !empty($response_decoded['account_id'])) { 107 $optin_account_id = intval($response_decoded['account_id']); 109 108 } 110 109 111 $optin_user_id = intval($response_decoded['user_id']); 112 if (!$optin_user_id) { 113 $optin_user_id = ''; 110 if(isset($response_decoded['user_id']) && !empty($response_decoded['user_id'])) { 111 $optin_user_id = intval($response_decoded['user_id']); 114 112 } 115 113 116 if ( !empty($optin_account_id) && !empty($optin_user_id)) {114 if (isset($optin_account_id) && !empty($optin_account_id) && isset($optin_user_id) && !empty($optin_user_id)) { 117 115 update_option("optin_account_id", $optin_account_id, 'no'); 118 116 update_option("optin_user_id", $optin_user_id, 'no');
Note: See TracChangeset
for help on using the changeset viewer.