expire_users_expired – Hook doesn’t seem to work
-
The hook above doesn’t work on my site for some reason.
I have the following code in functions.php-File:
function my_expire_users_expired( $user ) {
global $wpdb;
$zusatztabelle= ‘fruesch_users_zusaetze’;
$userid = $user->user_id;
$wpdb->update($zusatztabelle, array(
“bezahlstatus_mitgliedschaft” => NULL,
“anzahl_reduzierter_privatunterstuetzungsanfragen” => NULL
), array(
“user_id” => $userid
), array( “%s”,”%d”
), array(‘%d’));$privatanfragetabelle = ‘fruesch_privatunterstuetzungsanfragen’;
$anmeldungstabelle = ‘fruesch_anmeldungen_gruppenschulungen’;$wpdb->update($anmeldungstabelle, array(
“anzahl_reduzierter_privatunterstuetzungsanfragen” => NULL
), array(
“user_id” => $userid
), array( “%s”
), array(‘%d’));$wpdb->update($privatunterstuetzungsanfragen, array(
“anzahl_reduzierter_privatunterstuetzungsanfragen” => NULL
), array(
“user_id” => $userid
), array( “%s”
), array(‘%d’));}
add_action( ‘expire_users_expired’, ‘my_expire_users_expired’ );Any idea what’s wrong with the code? It doesn’t give any error in debug.log-File.
Thank you and best regards
Phil
The topic ‘expire_users_expired – Hook doesn’t seem to work’ is closed to new replies.