Skip to content

Commit

Permalink
Remove additional conditions that were added
Browse files Browse the repository at this point in the history
Issue #775
  • Loading branch information
fpcorso committed Oct 12, 2020
1 parent 3965e98 commit d64f850
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 70 deletions.
12 changes: 2 additions & 10 deletions classes/Integration/Form/CalderaForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,8 @@ public function get_form_selectlist() {
* @param array $form
*/
public function on_success( $form ) {
if ( ! isset( $_REQUEST['pum_form_popup_id'] ) ) {
return;
}

$popup_id = absint( $_REQUEST['pum_form_popup_id'] );
if ( 0 === $popup_id ) {
return;
}

$popup = pum_get_popup( $popup_id );
$popup_id = isset( $_REQUEST['pum_form_popup_id'] ) && absint( $_REQUEST['pum_form_popup_id'] ) > 0 ? absint( $_REQUEST['pum_form_popup_id'] ) : false;
$popup = pum_get_popup( $popup_id );
$popup->increase_event_count( 'conversion' );

pum_integrated_form_submission( [
Expand Down
12 changes: 2 additions & 10 deletions classes/Integration/Form/ContactForm7.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,8 @@ public function get_form_selectlist() {
*/
public function on_success( $cfdata ) {

if ( ! isset( $_REQUEST['pum_form_popup_id'] ) ) {
return;
}

$popup_id = absint( $_REQUEST['pum_form_popup_id'] );
if ( 0 === $popup_id ) {
return;
}

$popup = pum_get_popup( $popup_id );
$popup_id = isset( $_REQUEST['pum_form_popup_id'] ) && absint( $_REQUEST['pum_form_popup_id'] ) > 0 ? absint( $_REQUEST['pum_form_popup_id'] ) : false;
$popup = pum_get_popup( $popup_id );
$popup->increase_event_count( 'conversion' );

pum_integrated_form_submission( [
Expand Down
12 changes: 2 additions & 10 deletions classes/Integration/Form/FormidableForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,8 @@ public function on_success( $entry_id, $form_id ) {
return;
}

if ( ! isset( $_REQUEST['pum_form_popup_id'] ) ) {
return;
}

$popup_id = absint( $_REQUEST['pum_form_popup_id'] );
if ( 0 === $popup_id ) {
return;
}

$popup = pum_get_popup( $popup_id );
$popup_id = isset( $_REQUEST['pum_form_popup_id'] ) && absint( $_REQUEST['pum_form_popup_id'] ) > 0 ? absint( $_REQUEST['pum_form_popup_id'] ) : false;
$popup = pum_get_popup( $popup_id );
$popup->increase_event_count( 'conversion' );

pum_integrated_form_submission(
Expand Down
12 changes: 2 additions & 10 deletions classes/Integration/Form/GravityForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,8 @@ public function get_form_selectlist() {
* @param $form
*/
public function on_success( $entry, $form ) {
if ( ! isset( $_REQUEST['pum_form_popup_id'] ) ) {
return;
}

$popup_id = absint( $_REQUEST['pum_form_popup_id'] );
if ( 0 === $popup_id ) {
return;
}

$popup = pum_get_popup( $popup_id );
$popup_id = isset( $_REQUEST['pum_form_popup_id'] ) && absint( $_REQUEST['pum_form_popup_id'] ) > 0 ? absint( $_REQUEST['pum_form_popup_id'] ) : false;
$popup = pum_get_popup( $popup_id );
$popup->increase_event_count( 'conversion' );

pum_integrated_form_submission( [
Expand Down
12 changes: 2 additions & 10 deletions classes/Integration/Form/NinjaForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,8 @@ public function get_form_selectlist() {
public function on_success_v2() {
global $ninja_forms_processing;

if ( ! isset( $_REQUEST['pum_form_popup_id'] ) ) {
return;
}

$popup_id = absint( $_REQUEST['pum_form_popup_id'] );
if ( 0 === $popup_id ) {
return;
}

$popup = pum_get_popup( $popup_id );
$popup_id = isset( $_REQUEST['pum_form_popup_id'] ) && absint( $_REQUEST['pum_form_popup_id'] ) > 0 ? absint( $_REQUEST['pum_form_popup_id'] ) : false;
$popup = pum_get_popup( $popup_id );
$popup->increase_event_count( 'conversion' );

pum_integrated_form_submission( [
Expand Down
12 changes: 2 additions & 10 deletions classes/Integration/Form/PirateForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,16 +127,8 @@ public function get_form_selectlist() {
* @param int $entry_id Entry ID. Will return 0 if entry storage is disabled or using WPForms Lite.
*/
public function on_success( $fields, $entry, $form_data, $entry_id ) {
if ( ! isset( $_REQUEST['pum_form_popup_id'] ) ) {
return;
}

$popup_id = absint( $_REQUEST['pum_form_popup_id'] );
if ( 0 === $popup_id ) {
return;
}

$popup = pum_get_popup( $popup_id );
$popup_id = isset( $_REQUEST['pum_form_popup_id'] ) && absint( $_REQUEST['pum_form_popup_id'] ) > 0 ? absint( $_REQUEST['pum_form_popup_id'] ) : false;
$popup = pum_get_popup( $popup_id );
$popup->increase_event_count( 'conversion' );
pum_integrated_form_submission( [
'popup_id' => $popup_id,
Expand Down
12 changes: 2 additions & 10 deletions classes/Integration/Form/WPForms.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,8 @@ public function get_form_selectlist() {
* @param int $entry_id Entry ID. Will return 0 if entry storage is disabled or using WPForms Lite.
*/
public function on_success( $fields, $entry, $form_data, $entry_id ) {
if ( ! isset( $_REQUEST['pum_form_popup_id'] ) ) {
return;
}

$popup_id = absint( $_REQUEST['pum_form_popup_id'] );
if ( 0 === $popup_id ) {
return;
}

$popup = pum_get_popup( $popup_id );
$popup_id = isset( $_REQUEST['pum_form_popup_id'] ) && absint( $_REQUEST['pum_form_popup_id'] ) > 0 ? absint( $_REQUEST['pum_form_popup_id'] ) : false;
$popup = pum_get_popup( $popup_id );
$popup->increase_event_count( 'conversion' );
pum_integrated_form_submission( [
'popup_id' => $popup_id,
Expand Down

0 comments on commit d64f850

Please sign in to comment.