503 Service Unavailable

[ad_1]

///DELETE SUBSCRIPTION USER
ihc_send_user_notifications($uid, ‘ihc_delete_subscription_notification-user’, $lid);
///DELETE SUBSCRIPTION Admin
ihc_send_user_notifications($uid, ‘ihc_delete_subscription_notification-admin’, $lid);
}

add_action(‘ihc_action_after_order_placed’, ‘ihc_send_notf_after_order_placed’, 1, 2);
function ihc_send_notf_after_order_placed($uid=0, $lid=0){
/*
* @param int, int
* @return none
*/
///ORDER PLACED USER
ihc_send_user_notifications($uid, ‘ihc_order_placed_notification-user’, $lid);
///ORDER PLACED Admin
ihc_send_user_notifications($uid, ‘ihc_order_placed_notification-admin’, $lid);
}

add_action(‘ihc_action_after_subscription_activated’, ‘ihc_send_notf_after_subscription_activated’, 1, 2);
function ihc_send_notf_after_subscription_activated($uid=0, $lid=0){
/*
* @param int, int
* @reutnr none
*/
/// send notification to user
ihc_send_user_notifications($uid, ‘ihc_subscription_activated_notification’, $lid);
/// give a gift
if (ihc_is_magic_feat_active(‘gifts’)){
require_once IHC_PATH . ‘classes/Ihc_Gifts.class.php’;
$gift_object = new Ihc_Gifts($uid, $lid);
}
}

add_action(‘ihc_new_subscription_action’, ‘ihc_send_notf_on_new_subscription’, 1, 2);
function ihc_send_notf_on_new_subscription($uid=0, $lid=0){
/*
* @param int, int
* @reutnr none
*/
ihc_send_user_notifications($uid, ‘ihc_new_subscription_assign_notification-admin’, $lid);
}


add_action(‘wsl_hook_process_login_before_wp_safe_redirect’, ‘ihc_wp_social_login_do_redirect’, 99, 0);
function ihc_wp_social_login_do_redirect(){
/*
* @param none
* @return none, will do redirect if it’s case
*/
if (ihc_is_magic_feat_active(‘wp_social_login’)){
$redirect = get_option(‘ihc_wp_social_login_redirect_page’);
if ($redirect && $redirect!=-1){
$url = get_permalink($redirect);
if (!empty($url)){
wp_safe_redirect($url);
die();
}
}
}
}

add_action(‘wsl_hook_process_login_after_wp_insert_user’, ‘ihc_wp_social_login_after_register_action’, 99, 3);
function ihc_wp_social_login_after_register_action($user_id=0, $provider=”, $hybridauth_user_profile=”){
/*
* @param none
* @return none
*/
if ($user_id){
if (ihc_is_magic_feat_active(‘wp_social_login’)){
/// STORE AVATAR
if (!empty($hybridauth_user_profile) && !empty($hybridauth_user_profile->photoURL)){
update_user_meta($user_id, ‘ihc_avatar’, $hybridauth_user_profile->photoURL);
}

///ROLE
$role = get_option(‘ihc_wp_social_login_default_role’);
if ($role){
$u = new WP_User($user_id);
$u->set_role($role);
}

/// LEVEL
$lid = get_option(‘ihc_wp_social_login_default_level’);
if ($lid!=” && $lid!=-1){
$level_data = get_option(‘ihc_levels’);
$level_data = isset($level_data[$lid]) ? $level_data[$lid] : array();
ihc_do_complete_level_assign_from_ap($user_id, $lid);/// this will only add the level to user, but expire time is no hold
ihc_update_user_level_expire($level_data, $lid, $user_id); /// update expire time
}
}
}
}

/// PAYMENT GATE
function ihc_gate_add_query_vars_filter($vars=array()){
/*
* @param array
* @return array
*/
$vars[] = “ihc_action”;
$vars[] = “ihc_name”;
$vars[] = “ihc”;
return $vars;
}
add_filter(‘query_vars’, ‘ihc_gate_add_query_vars_filter’, 99);


add_action(‘pre_get_posts’, ‘ihc_payment_gate_check’, 999);
function ihc_payment_gate_check(){
/*
* @param string
* @return none
*/
if (!empty($_GET[‘ihc_action’])){
$ihc_action = $_GET[‘ihc_action’];
} else {
global $wp_query;
if (!empty($wp_query)) $ihc_action = get_query_var(‘ihc_action’);
}
if (!empty($ihc_action)){
$no_load = TRUE;
switch ($ihc_action){
case ‘paypal’:
require_once IHC_PATH . ‘paypal_ipn.php’;
break;
case ‘stripe’:
require_once IHC_PATH . ‘stripe_webhook.php’;
break;
case ‘twocheckout’:
require_once IHC_PATH . ‘twocheckout_ins.php’;
break;
case ‘authorize’:
require_once IHC_PATH . ‘authorize_response.php’;
break;
case ‘braintree’:
require_once IHC_PATH . ‘braintree_webhook.php’;
break;
case ‘payza’:
require_once IHC_PATH . ‘payza_webhook.php’;
break;
case ‘arrive’:
require_once IHC_PATH . ‘arrive.php’;
break;
case ‘user_activation’:
require_once IHC_PATH . ‘user_activation.php’;
break;
default:
$home = get_home_url();
wp_safe_redirect($home);
exit;
break;
}
}
}


add_action(“wp_ajax_nopriv_ihc_check_coupon_status_via_ajax”, “ihc_check_coupon_status_via_ajax”);
add_action(‘wp_ajax_ihc_check_coupon_status_via_ajax’, ‘ihc_check_coupon_status_via_ajax’);
function ihc_check_coupon_status_via_ajax(){
/*
* @param none
* @return none
*/
$data[‘is_active’] = 0;
$data[‘success_msg’] = __(‘Coupon applied successfully.’, ‘ihc’);
$data[‘err_msg’] = __(‘Coupon code is not valid.’, ‘ihc’);
if (!empty($_REQUEST[‘c’]) && isset($_REQUEST[‘l’])){
$check = ihc_check_coupon($_REQUEST[‘c’], $_REQUEST[‘l’]);
if (empty($check)){
$data[‘is_active’] = 0;
} else {
$data[‘is_active’] = 1;
}
}
echo json_encode($data);
die();
}


add_action(“wp_ajax_nopriv_ihc_get_ihc_state_field”, “ihc_get_ihc_state_field”);
add_action(‘wp_ajax_ihc_get_ihc_state_field’, ‘ihc_get_ihc_state_field’);
function ihc_get_ihc_state_field(){
/*
* @param none
* @return string
*/
if (isset($_REQUEST[‘country’])){
echo ihc_get_state_field_str($_REQUEST[‘country’]);
}
die();
}

add_action(“wp_ajax_nopriv_ihc_remove_sm_from_user”, “ihc_remove_sm_from_user”);
add_action(‘wp_ajax_ihc_remove_sm_from_user’, ‘ihc_remove_sm_from_user’);
function ihc_remove_sm_from_user(){
/*
* @param none
* @return string
*/
if (isset($_REQUEST[‘type’])){
global $current_user;
if (isset($current_user->ID)){
delete_user_meta($current_user->ID, ‘ihc_’ . $_REQUEST[‘type’] );
}
}
die();
}

add_action(“wp_ajax_nopriv_ihc_generate_invoice”, “ihc_generate_invoice”);
add_action(‘wp_ajax_ihc_generate_invoice’, ‘ihc_generate_invoice’);
function ihc_generate_invoice(){
/*
* @param none
* @return string
*/
if (isset($_REQUEST[‘order_id’])){
if (is_admin()){
/// is secure so get the uid from order table
$uid = Ihc_Db::get_uid_by_order_id($_REQUEST[‘order_id’]);
$check = TRUE;
} else {
global $current_user;
$uid = (isset($current_user->ID)) ? $current_user->ID : 0;
$check = Ihc_Db::is_order_id_for_uid($uid, $_REQUEST[‘order_id’]); /// Security check
}

if ($check && $uid){
require_once IHC_PATH . ‘classes/Ihc_Invoice.class.php’;
$object = new Ihc_Invoice($uid, $_REQUEST[‘order_id’]);
echo $object->output(TRUE);
}
}
die();
}

add_action(‘user_register’, ‘ihc_increment_dashboard_user_notification’, 1, 1);
function ihc_increment_dashboard_user_notification($uid=0){
/*
* @param int
* @return none
*/
Ihc_Db::increment_dashboard_notification(‘users’);
}

if (!function_exists(‘ihc_do_clean_security_table’)):
function ihc_do_clean_security_table(){
/*
* @param none
* @return none
*/
global $wpdb;
$table = $wpdb->prefix . ‘ihc_security_login’;
$current_time = time();
$expire_hours = get_option(‘ihc_login_security_extended_lockout_time’);
if ($expire_hours===FALSE){
$expire_hours = 24;
}
$expire = $expire_hours * 60 * 60;
$wpdb->query(“UPDATE $table SET attempts_count=0, locked=0 WHERE log_time+$expire __(‘Ultimate Membership Pro’, ‘ihc’),
‘description’ => __(‘Ultimate Membership Pro – buy level hook.’, ‘ihc’),
‘callback’ => array(‘Ihc_My_Cred’)
);
return $installed;
}
add_action(‘mycred_load_hooks’, ‘mycredpro_load_custom_hook’);
function mycredpro_load_custom_hook(){
require_once IHC_PATH . ‘classes/Ihc_My_Cred.class.php’;
}
endif;
//===================== END MyCred Integration Module ============================

503 Service Unavailable

The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.

Additionally, a 503 Service Unavailable
error was encountered while trying to use an ErrorDocument to handle the request.

[ad_2]

Latest posts