@@ -71,8 +71,8 @@ |
||
| 71 | 71 | |
| 72 | 72 | case 'user_id' : |
| 73 | 73 | return '<a href="' . |
| 74 | - admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . ( ! empty( $item['user_id'] ) ? urlencode( $item['user_id'] ) : give_get_payment_user_email( $item['payment_id'] ) ) ) . |
|
| 75 | - '">' . $item['user_name'] . '</a>'; |
|
| 74 | + admin_url( 'edit.php?post_type=give_forms&page=give-payment-history&user=' . ( ! empty( $item['user_id'] ) ? urlencode( $item['user_id'] ) : give_get_payment_user_email( $item['payment_id'] ) ) ) . |
|
| 75 | + '">' . $item['user_name'] . '</a>'; |
|
| 76 | 76 | |
| 77 | 77 | case 'amount' : |
| 78 | 78 | return give_currency_filter( give_format_amount( $item['amount'] ) ); |
@@ -97,10 +97,10 @@ |
||
| 97 | 97 | |
| 98 | 98 | //Single Form settings varies compared to the Global default settings |
| 99 | 99 | if ( ! empty( $form_default ) && |
| 100 | - $form_id !== null && |
|
| 101 | - $default !== $form_default && |
|
| 102 | - $form_default !== 'global' && |
|
| 103 | - give_is_gateway_active( $form_default ) |
|
| 100 | + $form_id !== null && |
|
| 101 | + $default !== $form_default && |
|
| 102 | + $form_default !== 'global' && |
|
| 103 | + give_is_gateway_active( $form_default ) |
|
| 104 | 104 | ) { |
| 105 | 105 | $default = $form_default; |
| 106 | 106 | } |
@@ -117,8 +117,8 @@ |
||
| 117 | 117 | $shortcode_button_pages = array( 'post.php', 'page.php', 'post-new.php', 'post-edit.php' ); |
| 118 | 118 | // Only run in admin post/page creation and edit screens |
| 119 | 119 | if ( in_array( $pagenow, $shortcode_button_pages ) |
| 120 | - && apply_filters( 'give_shortcode_button_condition', true ) |
|
| 121 | - && ! empty( self::$shortcodes ) |
|
| 120 | + && apply_filters( 'give_shortcode_button_condition', true ) |
|
| 121 | + && ! empty( self::$shortcodes ) |
|
| 122 | 122 | ) { |
| 123 | 123 | |
| 124 | 124 | $shortcodes = array(); |
@@ -727,10 +727,10 @@ discard block |
||
| 727 | 727 | } |
| 728 | 728 | |
| 729 | 729 | if ( ! is_int( $params[1] ) |
| 730 | - && ! is_float( $params[1] ) |
|
| 731 | - && ! is_string( $params[1] ) |
|
| 732 | - && $params[1] !== null |
|
| 733 | - && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) ) |
|
| 730 | + && ! is_float( $params[1] ) |
|
| 731 | + && ! is_string( $params[1] ) |
|
| 732 | + && $params[1] !== null |
|
| 733 | + && ! ( is_object( $params[1] ) && method_exists( $params[1], '__toString' ) ) |
|
| 734 | 734 | ) { |
| 735 | 735 | trigger_error( 'array_column(): The column key should be either a string or an integer', E_USER_WARNING ); |
| 736 | 736 | |
@@ -738,10 +738,10 @@ discard block |
||
| 738 | 738 | } |
| 739 | 739 | |
| 740 | 740 | if ( isset( $params[2] ) |
| 741 | - && ! is_int( $params[2] ) |
|
| 742 | - && ! is_float( $params[2] ) |
|
| 743 | - && ! is_string( $params[2] ) |
|
| 744 | - && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) ) |
|
| 741 | + && ! is_int( $params[2] ) |
|
| 742 | + && ! is_float( $params[2] ) |
|
| 743 | + && ! is_string( $params[2] ) |
|
| 744 | + && ! ( is_object( $params[2] ) && method_exists( $params[2], '__toString' ) ) |
|
| 745 | 745 | ) { |
| 746 | 746 | trigger_error( 'array_column(): The index key should be either a string or an integer', E_USER_WARNING ); |
| 747 | 747 | |
@@ -899,7 +899,7 @@ |
||
| 899 | 899 | //Find a match between price_id and level_id |
| 900 | 900 | //First verify array keys exists THEN make the match |
| 901 | 901 | if ( ( isset( $args['price_id'] ) && isset( $price['_give_id']['level_id'] ) ) |
| 902 | - && $args['price_id'] == $price['_give_id']['level_id'] |
|
| 902 | + && $args['price_id'] == $price['_give_id']['level_id'] |
|
| 903 | 903 | ) { |
| 904 | 904 | $item_price = $price['_give_amount']; |
| 905 | 905 | } |
@@ -188,8 +188,8 @@ |
||
| 188 | 188 | |
| 189 | 189 | $payment_ids = implode( ',', $payment_ids ); |
| 190 | 190 | $customer->update( array( 'payment_ids' => $payment_ids, |
| 191 | - 'purchase_count' => $purchase_count, |
|
| 192 | - 'purchase_value' => $pending_total |
|
| 191 | + 'purchase_count' => $purchase_count, |
|
| 192 | + 'purchase_value' => $pending_total |
|
| 193 | 193 | ) ); |
| 194 | 194 | |
| 195 | 195 | $this->done = true; |
@@ -42,16 +42,16 @@ |
||
| 42 | 42 | 'minWidth' => 320, |
| 43 | 43 | 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after login.', 'give' ), |
| 44 | 44 | ), |
| 45 | - array( |
|
| 46 | - 'type' => 'container', |
|
| 47 | - 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
|
| 48 | - ), |
|
| 49 | - array( |
|
| 50 | - 'type' => 'textbox', |
|
| 51 | - 'name' => 'logout-redirect', |
|
| 52 | - 'minWidth' => 320, |
|
| 53 | - 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
|
| 54 | - ), |
|
| 45 | + array( |
|
| 46 | + 'type' => 'container', |
|
| 47 | + 'html' => sprintf( '<p class="no-margin">%s</p>', esc_html__( 'Logout Redirect URL (optional):', 'give' ) ), |
|
| 48 | + ), |
|
| 49 | + array( |
|
| 50 | + 'type' => 'textbox', |
|
| 51 | + 'name' => 'logout-redirect', |
|
| 52 | + 'minWidth' => 320, |
|
| 53 | + 'tooltip' => esc_attr__( 'Enter an URL here to redirect to after logout.', 'give' ), |
|
| 54 | + ), |
|
| 55 | 55 | ); |
| 56 | 56 | } |
| 57 | 57 | } |
@@ -248,8 +248,8 @@ |
||
| 248 | 248 | |
| 249 | 249 | // do not reindex array! |
| 250 | 250 | $field['options'] = array( |
| 251 | - '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ), |
|
| 252 | - ) + $field['options']; |
|
| 251 | + '' => ( $field['placeholder'] ? $field['placeholder'] : esc_attr__( '- Select -', 'give' ) ), |
|
| 252 | + ) + $field['options']; |
|
| 253 | 253 | |
| 254 | 254 | foreach ( $field['options'] as $value => $text ) { |
| 255 | 255 | $new_listbox['values'][] = array( |
@@ -408,30 +408,30 @@ |
||
| 408 | 408 | die( '-2' ); |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | - if ( ! give_has_variable_prices( $form_id ) ) { |
|
| 412 | - esc_html_e( 'n/a', 'give' ); |
|
| 413 | - } else { |
|
| 414 | - // Payment object. |
|
| 415 | - $payment = new Give_Payment( $payment_id ); |
|
| 416 | - |
|
| 417 | - // Payment meta. |
|
| 418 | - $payment_meta = $payment->get_meta(); |
|
| 419 | - |
|
| 420 | - |
|
| 421 | - // Variable price dropdown options. |
|
| 422 | - $variable_price_dropdown_option = array( |
|
| 423 | - 'id' => $form_id, |
|
| 424 | - 'name' => 'give-variable-price', |
|
| 425 | - 'chosen' => true, |
|
| 426 | - 'show_option_all' => '', |
|
| 427 | - 'selected' => $payment_meta['price_id'], |
|
| 428 | - ); |
|
| 429 | - |
|
| 430 | - // Render variable prices select tag html. |
|
| 431 | - give_get_form_variable_price_dropdown( $variable_price_dropdown_option, true ); |
|
| 432 | - } |
|
| 433 | - |
|
| 434 | - give_die(); |
|
| 411 | + if ( ! give_has_variable_prices( $form_id ) ) { |
|
| 412 | + esc_html_e( 'n/a', 'give' ); |
|
| 413 | + } else { |
|
| 414 | + // Payment object. |
|
| 415 | + $payment = new Give_Payment( $payment_id ); |
|
| 416 | + |
|
| 417 | + // Payment meta. |
|
| 418 | + $payment_meta = $payment->get_meta(); |
|
| 419 | + |
|
| 420 | + |
|
| 421 | + // Variable price dropdown options. |
|
| 422 | + $variable_price_dropdown_option = array( |
|
| 423 | + 'id' => $form_id, |
|
| 424 | + 'name' => 'give-variable-price', |
|
| 425 | + 'chosen' => true, |
|
| 426 | + 'show_option_all' => '', |
|
| 427 | + 'selected' => $payment_meta['price_id'], |
|
| 428 | + ); |
|
| 429 | + |
|
| 430 | + // Render variable prices select tag html. |
|
| 431 | + give_get_form_variable_price_dropdown( $variable_price_dropdown_option, true ); |
|
| 432 | + } |
|
| 433 | + |
|
| 434 | + give_die(); |
|
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | add_action( 'wp_ajax_give_check_for_form_price_variations_html', 'give_check_for_form_price_variations_html' ); |