Skip to content

Commit 20d7fd5

Browse files
committed
Reinstate missing add_subscriber_to_legacy_form method
1 parent e9b74c9 commit 20d7fd5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/class-convertkit-api-traits.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,21 @@ public function add_subscriber_to_form(int $form_id, int $subscriber_id, string
303303
);
304304
}
305305

306+
/**
307+
* Adds a subscriber to a legacy form by subscriber ID
308+
*
309+
* @param integer $form_id Legacy Form ID.
310+
* @param integer $subscriber_id Subscriber ID.
311+
*
312+
* @since 2.0.0
313+
*
314+
* @return WP_Error|array
315+
*/
316+
public function add_subscriber_to_legacy_form(int $form_id, int $subscriber_id)
317+
{
318+
return $this->post(sprintf('landing_pages/%s/subscribers/%s', $form_id, $subscriber_id));
319+
}
320+
306321
/**
307322
* List subscribers for a form
308323
*

0 commit comments

Comments
 (0)