A non-coding friend has created an integration from Forminator > TNP, where we would like to add these users as unconfirmed until an order in woocommerce has been paid and confirm it then.
Now my idea was to hook into newsletter_user_subscribe
and reset $user->status = "S"
and reset it upon woocommerce_order_status_processing
so my basic approach is add_filter("newsletter_user_subscribe", "rtr_subscriber_update", 10, 1);
function rtr_subscriber_update($user) {
if(is_admin()) {
return;
}
$user->status = 'S';
return $user; <code>which results into sending out activation emails regardless of settings or</code>add_filter('newsletter_activation_email', function ($default, $user) { return false; }, 10, 2);
– btw newlines dont seem to work in the forum, also I dont get the code formatting done better :/ sorry