AnsPress_Hooks::delete_subscribers( string $rows, string $where )
Description #
Update qameta subscribers count before deleting subscribers.
Parameters #
- $rowsstring (Required) Number of rows deleted.
- $wherestring (Required) Where clause.
Source #
File: includes/hooks.php
public static function delete_subscribers( $rows, $where ) {
if ( ! isset( $where['subs_ref_id'] ) || ! isset( $where['subs_event'] ) ) {
return;
}
// Remove ids from event.
$esc_event = ap_esc_subscriber_event( $where['subs_event'] );
if ( in_array( $esc_event, [ 'question', 'answer', 'comment' ], true ) ) {
ap_update_subscribers_count( $where['subs_ref_id'] );
}
}
Expand full source code Collapse full source code View on GitHub: includes/hooks.php:978
Add your comment