ap_delete_subscriber( integer $ref_id, integer $user_id, string $event )
Description #
Delete a single subscriber.
This is a preferred function for deleting a subscriber. Avoid using function @see ap_delete_subscribers().
Parameters #
- $ref_idinteger (Required) Reference id.
- $user_idinteger (Required) User id.
- $eventstring (Required) Event type.
Source #
File: includes/subscribers.php
function ap_delete_subscriber( $ref_id, $user_id, $event ) { global $wpdb; $rows = $wpdb->delete( // phpcs:ignore WordPress.DB $wpdb->ap_subscribers, array( 'subs_ref_id' => $ref_id, 'subs_user_id' => $user_id, 'subs_event' => $event, ), array( '%d', '%d', '%s' ) ); if ( false !== $rows ) { /** * Action triggered right after deleting a single subscriber. * * @param integer $ref_id Reference id. * @param integer $user_id User id. * @param string $event Event type. */ do_action( 'ap_delete_subscriber', $ref_id, $user_id, $event ); return true; } return false; }
Expand full source code Collapse full source code View on GitHub: includes/subscribers.php:292
Add your comment