| @@ 1097-1118 (lines=22) @@ | ||
| 1094 | $input_value = $primary_registrant[ $form_input ]; |
|
| 1095 | } |
|
| 1096 | // now attempt to save the input data |
|
| 1097 | if (! $this->_save_registration_form_input( |
|
| 1098 | $registration, |
|
| 1099 | $form_input, |
|
| 1100 | $input_value |
|
| 1101 | ) |
|
| 1102 | ) { |
|
| 1103 | EE_Error::add_error( |
|
| 1104 | sprintf( |
|
| 1105 | esc_html_x( |
|
| 1106 | 'Unable to save registration form data for the form input: "%1$s" with the submitted value: "%2$s"', |
|
| 1107 | 'Unable to save registration form data for the form input: "form input name" with the submitted value: "form input value"', |
|
| 1108 | 'event_espresso' |
|
| 1109 | ), |
|
| 1110 | $form_input, |
|
| 1111 | $input_value |
|
| 1112 | ), |
|
| 1113 | __FILE__, |
|
| 1114 | __FUNCTION__, |
|
| 1115 | __LINE__ |
|
| 1116 | ); |
|
| 1117 | return false; |
|
| 1118 | } |
|
| 1119 | } |
|
| 1120 | } |
|
| 1121 | } // end of foreach ( $valid_data[ $reg_url_link ] as $form_section => $form_inputs ) |
|
| @@ 99-119 (lines=21) @@ | ||
| 96 | 'body' => http_build_query($request_params, '', '&'), |
|
| 97 | ) |
|
| 98 | ); |
|
| 99 | if (is_wp_error($response)) { |
|
| 100 | // If we got here then there was an error in this request. |
|
| 101 | // maybe is turned off. We don't know the credentials are invalid |
|
| 102 | $error = sprintf( |
|
| 103 | // translators: %1$s Error message received from PayPal |
|
| 104 | esc_html__( |
|
| 105 | // @codingStandardsIgnoreStart |
|
| 106 | 'Your PayPal credentials could not be verified. The following error occurred while communicating with PayPal: %1$s', |
|
| 107 | // @codingStandardsIgnoreEnd |
|
| 108 | 'event_espresso' |
|
| 109 | ), |
|
| 110 | $response->get_error_message() |
|
| 111 | ); |
|
| 112 | EE_Error::add_error( |
|
| 113 | $error, |
|
| 114 | __FILE__, |
|
| 115 | __FUNCTION__, |
|
| 116 | __LINE__ |
|
| 117 | ); |
|
| 118 | return $error; |
|
| 119 | } |
|
| 120 | $response_args = array(); |
|
| 121 | parse_str(urldecode($response['body']), $response_args); |
|
| 122 | ||
| @@ 74-91 (lines=18) @@ | ||
| 71 | ||
| 72 | foreach ($props as $property => $val) { |
|
| 73 | $setter = 'set' . $property; |
|
| 74 | if (method_exists($this, $setter)) { |
|
| 75 | $this->$setter($val); |
|
| 76 | } else { |
|
| 77 | // No setter found. |
|
| 78 | EE_Error::add_error( |
|
| 79 | sprintf( |
|
| 80 | esc_html__( |
|
| 81 | 'EEH_Sideloader::%1$s not found. There is no setter for the %2$s property.', |
|
| 82 | 'event_espresso' |
|
| 83 | ), |
|
| 84 | $setter, |
|
| 85 | $property |
|
| 86 | ), |
|
| 87 | __FILE__, |
|
| 88 | __FUNCTION__, |
|
| 89 | __LINE__ |
|
| 90 | ); |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| 94 | // make sure we include the required wp file for needed functions |
|