get_current_service(); if ( (bool) $service === false ) { throw new RuntimeException( 'Tried to invalidate a service, but no service is active!' ); } $service->custom_fields_data = false; $this->set_current_service( $service ); do_action( 'wpml_tp_service_de_authorized', $service ); } }