I need the ability to manually trigger a digest email

Hi,

I need the ability to manually trigger a digest email because I've missed my deadline for today. Is that possible?

Also, is there a function I can call to subscribe people? I want to subscribe people after they checkout via WooCommerce but don't know of any function I can call to do it.

  • Ignacio

    Hi @Ashraf.

    There's no way to trigger the sending right now. You can do it manually by getting into the database and search for next_week_scheduled or next_day_scheduled option_name in options table and set them to 1. This will trigger the sendings next time you reload a page but you cannot select the posts to send, You frist need to set the digest daily or weekly and then set the option to 1.

    Fortunately we're working on a feature that will allow users to trigger a sending whenever they want and include the posts created X days ago but it won't be included in the next version that will be released on this week more or less.

    There's a function that will allow you to subscribe people. You'll need to call it this way ( an easier to use function is on the way):

    if (class_exists('Incsub_Subscribe_By_Email') ) {
    	// Here are the params:
    	//Incsub_Subscribe_By_Email::subscribe_user( $user_email, $note, $type, $autopt = false );
    
    	Incsub_Subscribe_By_Email::subscribe_user( 'anemail@mail.com', 'Manual subscription', 'Woocommerce checkout', true );
    
    }

    If autopt is set to false, it will send a confirmation email to the user.

    Regards.
    Ignacio.