Skip to content

Commit 5d5715a

Browse files
committed
Remove code
1 parent aa90288 commit 5d5715a

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

src/ConvertKit_API_Traits.php

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -254,25 +254,16 @@ public function add_subscribers_to_forms(array $forms_subscribers_ids, string $c
254254
*
255255
* @param integer $form_id Form ID.
256256
* @param string $email_address Email Address.
257-
* @param string $referrer Referrer.
258257
*
259258
* @see https://developers.convertkit.com/v4.html#add-subscriber-to-form-by-email-address
260259
*
261260
* @return false|mixed
262261
*/
263-
public function add_subscriber_to_form_by_email(int $form_id, string $email_address, string $referrer = '')
262+
public function add_subscriber_to_form_by_email(int $form_id, string $email_address)
264263
{
265-
// Build parameters.
266-
$options = ['email_address' => $email_address];
267-
268-
if (!empty($referrer)) {
269-
$options['referrer'] = $referrer;
270-
}
271-
272-
// Send request.
273264
return $this->post(
274265
sprintf('forms/%s/subscribers', $form_id),
275-
$options
266+
['email_address' => $email_address]
276267
);
277268
}
278269

@@ -281,28 +272,16 @@ public function add_subscriber_to_form_by_email(int $form_id, string $email_addr
281272
*
282273
* @param integer $form_id Form ID.
283274
* @param integer $subscriber_id Subscriber ID.
284-
* @param string $referrer Referrer URL.
285275
*
286276
* @see https://developers.convertkit.com/v4.html#add-subscriber-to-form
287277
*
288278
* @since 2.0.0
289279
*
290280
* @return false|mixed
291281
*/
292-
public function add_subscriber_to_form(int $form_id, int $subscriber_id, string $referrer = '')
282+
public function add_subscriber_to_form(int $form_id, int $subscriber_id)
293283
{
294-
// Build parameters.
295-
$options = [];
296-
297-
if (!empty($referrer)) {
298-
$options['referrer'] = $referrer;
299-
}
300-
301-
// Send request.
302-
return $this->post(
303-
sprintf('forms/%s/subscribers/%s', $form_id, $subscriber_id),
304-
$options
305-
);
284+
return $this->post(sprintf('forms/%s/subscribers/%s', $form_id, $subscriber_id));
306285
}
307286

308287
/**

0 commit comments

Comments
 (0)