| @@ -48,9 +48,9 @@ | ||
| 48 | 48 | 'email' => 'FrmEmailAction', |
| 49 | 49 | 'wppost' => 'FrmDefPostAction', |
| 50 | 50 | 'register' => 'FrmDefRegAction', |
| 51 | 51 | 'paypal' => 'FrmDefPayPalAction', |
| 52 | - 'payment' => 'FrmTransLiteAction', | |
| 52 | + 'payment' => 'FrmDefHrsAction', | |
| 53 | 53 | 'quiz' => 'FrmDefQuizAction', |
| 54 | 54 | 'quiz_outcome' => 'FrmDefQuizOutcomeAction', |
| 55 | 55 | 'mailchimp' => 'FrmDefMlcmpAction', |
| 56 | 56 | 'api' => 'FrmDefApiAction', |
| @@ -486,9 +486,9 @@ | ||
| 486 | 486 | |
| 487 | 487 | $stored_actions = array(); |
| 488 | 488 | $action_priority = array(); |
| 489 | 489 | |
| 490 | - if ( in_array( $event, array( 'create', 'update' ), true ) && defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { | |
| 490 | + if ( in_array( $event, array( 'create', 'update' ) ) && defined( 'WP_IMPORTING' ) && WP_IMPORTING ) { | |
| 491 | 491 | $this_event = 'import'; |
| 492 | 492 | } else { |
| 493 | 493 | $this_event = $event; |
| 494 | 494 | } |
| @@ -504,9 +504,9 @@ | ||
| 504 | 504 | if ( ! is_object( $entry ) ) { |
| 505 | 505 | $entry = FrmEntry::getOne( $entry, true ); |
| 506 | 506 | } |
| 507 | 507 | |
| 508 | - if ( empty( $entry ) || ( FrmEntriesHelper::DRAFT_ENTRY_STATUS === (int) $entry->is_draft && 'draft' !== $event ) ) { | |
| 508 | + if ( empty( $entry ) || ( $entry->is_draft && $event != 'draft' ) ) { | |
| 509 | 509 | continue; |
| 510 | 510 | } |
| 511 | 511 | |
| 512 | 512 | $child_entry = ( ( is_object( $form ) && is_numeric( $form->parent_form_id ) && $form->parent_form_id ) || ( $entry && ( $entry->form_id != $form->id || $entry->parent_item_id ) ) || ( isset( $args['is_child'] ) && $args['is_child'] ) ); |
| @@ -543,9 +543,9 @@ | ||
| 543 | 543 | do_action( 'frm_trigger_' . $action->post_excerpt . '_action', $action, $entry, $form, $event ); |
| 544 | 544 | do_action( 'frm_trigger_' . $action->post_excerpt . '_' . $event . '_action', $action, $entry, $form ); |
| 545 | 545 | |
| 546 | 546 | // If post is created, get updated $entry object. |
| 547 | - if ( $action->post_excerpt === 'wppost' && $event === 'create' ) { | |
| 547 | + if ( $action->post_excerpt == 'wppost' && $event == 'create' ) { | |
| 548 | 548 | $entry = FrmEntry::getOne( $entry->id, true ); |
| 549 | 549 | } |
| 550 | 550 | } |
| 551 | 551 | } |
| @@ -551,9 +551,9 @@ | ||
| 551 | 551 | } |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | public static function duplicate_form_actions( $form_id, $values, $args = array() ) { |
| 555 | - if ( empty( $args['old_id'] ) ) { | |
| 555 | + if ( ! isset( $args['old_id'] ) || empty( $args['old_id'] ) ) { | |
| 556 | 556 | // Continue if we know which actions to copy. |
| 557 | 557 | return; |
| 558 | 558 | } |
| 559 | 559 | |