Skip to content

Commit

Permalink
Merge pull request #377 from ConvertKit/integrations-no-forms-html
Browse files Browse the repository at this point in the history
Integrations: Render closing HTML elements when no Forms
  • Loading branch information
n7studios authored Oct 26, 2022
2 parents 537aa8e + 69929e4 commit 2c0645d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public function render() {
// Bail with an error if no ConvertKit Forms exist.
if ( ! $forms->exist() ) {
$this->output_error( __( 'No Forms exist on ConvertKit.', 'convertkit' ) );
$this->render_container_end();
return;
}

Expand All @@ -107,6 +108,7 @@ public function render() {
// Bail with an error if no Contact Form 7 Forms exist.
if ( ! $cf7_forms ) {
$this->output_error( __( 'No Contact Form 7 Forms exist in the Contact Form 7 Plugin.', 'convertkit' ) );
$this->render_container_end();
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function render() {
// Bail with an error if no WishList Member Levels exist.
if ( ! $wlm_levels ) {
$this->output_error( __( 'No WishList Member Levels exist in the WishList Member Plugin.', 'convertkit' ) );
$this->render_container_end();
return;
}

Expand All @@ -94,12 +95,14 @@ public function render() {
// Bail with an error if no ConvertKit Forms exist.
if ( ! $forms->exist() ) {
$this->output_error( __( 'No Forms exist on ConvertKit.', 'convertkit' ) );
$this->render_container_end();
return;
}

// Bail with an error if no ConvertKit Tags exist.
if ( ! $tags->exist() ) {
$this->output_error( __( 'No Tags exist on ConvertKit.', 'convertkit' ) );
$this->render_container_end();
return;
}

Expand Down

0 comments on commit 2c0645d

Please sign in to comment.