Title: Subscribe2 API
Last modified: May 11, 2020

---

# Subscribe2 API

 *  [raywarburton](https://wordpress.org/support/users/raywarburton/)
 * (@raywarburton)
 * [6 years ago](https://wordpress.org/support/topic/subscribe2-api-2/)
 * 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)

 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [6 years ago](https://wordpress.org/support/topic/subscribe2-api-2/#post-12819438)
 * [@raywarburton](https://wordpress.org/support/users/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](https://wordpress.org/support/users/raywarburton/)
 * (@raywarburton)
 * [6 years ago](https://wordpress.org/support/topic/subscribe2-api-2/#post-12821383)
 * 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?
 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [6 years ago](https://wordpress.org/support/topic/subscribe2-api-2/#post-12821973)
 * [@raywarburton](https://wordpress.org/support/users/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](https://wordpress.org/support/users/raywarburton/)
 * (@raywarburton)
 * [6 years ago](https://wordpress.org/support/topic/subscribe2-api-2/#post-12822101)
 * 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.
 *  [Matt Robinson](https://wordpress.org/support/users/mattyrob/)
 * (@mattyrob)
 * [6 years ago](https://wordpress.org/support/topic/subscribe2-api-2/#post-12822124)
 * [@raywarburton](https://wordpress.org/support/users/raywarburton/)
 * The free version of Subscribe2 is installed from the plugins page in WordPress
   or via the Download button on this page:
    [https://wordpress.org/plugins/subscribe2/](https://wordpress.org/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](https://wordpress.org/support/users/raywarburton/)
 * (@raywarburton)
 * [6 years ago](https://wordpress.org/support/topic/subscribe2-api-2/#post-12822270)
 * 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.

 * ![](https://ps.w.org/subscribe2/assets/icon-256x256.png?rev=2318630)
 * [Subscribe2 - Form, Email Subscribers & Newsletters](https://wordpress.org/plugins/subscribe2/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/subscribe2/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/subscribe2/)
 * [Active Topics](https://wordpress.org/support/plugin/subscribe2/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/subscribe2/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/subscribe2/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [raywarburton](https://wordpress.org/support/users/raywarburton/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/subscribe2-api-2/#post-12822270)
 * Status: not resolved