update_noptin_subscriber_meta( int $subscriber_id, string $meta_key, mixed $meta_value, mixed $prev_value = '' )

Updates subscriber meta field for a subscriber.


Description Description

Use the $prev_value parameter to differentiate between meta fields with the same key and subscriber ID.

If the meta field for the subscriber does not exist, it will be added and its ID returned.


Top ↑

Parameters Parameters

$subscriber_id

(int) (Required) Subscriber ID.

$meta_key

(string) (Required) The meta key to update.

$meta_value

(mixed) (Required) Metadata value. Must be serializable if non-scalar.

$prev_value

(mixed) (Optional) Previous value to check before updating.

Default value: ''


Top ↑

Return Return

(mixed) The new meta field ID if a field with the given key didn't exist and was therefore added, true on successful update, false on failure.


Top ↑

Source Source

File: includes/subscriber.php

function update_noptin_subscriber_meta( $subscriber_id, $meta_key, $meta_value, $prev_value = '' ) {
	return update_metadata( 'noptin_subscriber', $subscriber_id, $meta_key, $meta_value, $prev_value );
}


Top ↑

Changelog Changelog

Changelog
VersionDescription
1.0.5Introduced.

Top ↑

User Contributed Notes User Contributed Notes

30 day money back guarantee
Safe & Secure online payment
Custom CSS Slide Example
Custom Animation Example
Default Animation