Skip to content

Commit

Permalink
Remove unreachable conditional block (#170)
Browse files Browse the repository at this point in the history
* Remove unreachable conditional block

Closes #157

* Remove unused variable
  • Loading branch information
tnorthcutt authored Feb 1, 2019
1 parent 1d84a23 commit b35a7d7
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions includes/class-convertkit-custom-content.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ public static function shortcode( $attributes, $content ) {
if ( isset( $attributes['tag'] ) ) {
$tags = array();
$tag = $attributes['tag'];
$user_id = get_current_user_id();
$api = WP_ConvertKit::get_api();

if ( isset( $_COOKIE['ck_subscriber_id'] ) ) {
Expand All @@ -199,13 +198,6 @@ public static function shortcode( $attributes, $content ) {
if ( $subscriber_id ) {
$tags = $api->get_subscriber_tags( $subscriber_id );
}
} elseif ( isset( $_COOKIE['ck_subscriber_id'] ) ) {
WP_ConvertKit::log( 'shortcode: cookie param found, calling API' );
// get cookie and check API for customer tags.
$subscriber_id = absint( $_GET['ck_subscriber_id'] );
if ( $subscriber_id ) {
$tags = $api->get_subscriber_tags( $subscriber_id );
}
} elseif ( isset( $_GET['ck_subscriber_id'] ) ) {
WP_ConvertKit::log( 'shortcode: URL param found, calling API' );
// get cookie and check API for customer tags.
Expand Down

0 comments on commit b35a7d7

Please sign in to comment.