• Is the API available in the basic version of Subscribe2, or only in the paid Subscribe2 HTML version. I’ve been looking for it in the basic version and can’t find it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • @raywarburton

    Yes, the API is available in the free version, it just won’t be as extensive, but it’s there.

    Which hook were you looking for?

    Thread Starter raywarburton

    (@raywarburton)

    Hi,

    Thanks for the reply. I’m looking for:

    function my_cleaner_interval() {
    // return the number of days before removal
    // returning 0 turns this feature off
    return 14;
    }
    add_filter( ‘s2_clean_interval’, ‘my_cleaner_interval’ );

    I want to reduce the time before unconfirmed subscriptions are removed to 2 days. Incidentally why is it return 14 when the default is 28 days?

    @raywarburton

    That hook is still in the free code and should work as expected. Change the code above t return 2 (14 is an example of changing the clean to 2 weeks. The code you will need is something like this:

    function my_cleaner_interval() {
    	return 14;
    }
    add_filter( 's2_clean_interval', 'my_cleaner_interval' );
    Thread Starter raywarburton

    (@raywarburton)

    How do I access the free code? I don’t see anything in settings to give me access. I can retrieve files with FileZilla and access them, if I know the file name. So far I haven’t managed to look in the right place.

    @raywarburton

    The free version of Subscribe2 is installed from the plugins page in WordPress or via the Download button on this page:
    https://www.ads-software.com/plugins/subscribe2/

    That code above should be added to your own custom plugin or your themes functions.php file, not to Subscribe2 as the change will get lost with any update.

    Thread Starter raywarburton

    (@raywarburton)

    OK I’ve stuck it in the themes functions.php file. Time will tell if it works.

    Thanks for your help.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Subscribe2 API’ is closed to new replies.