| @@ -13,9 +13,9 @@ | ||
| 13 | 13 | 'active' => true, |
| 14 | 14 | // After user registration. |
| 15 | 15 | 'priority' => 45, |
| 16 | 16 | 'event' => array( 'create' ), |
| 17 | - 'color' => 'var(--green)', | |
| 17 | + 'color' => '#3fac25', | |
| 18 | 18 | ); |
| 19 | 19 | |
| 20 | 20 | $this->FrmFormAction( 'payment', __( 'Collect a Payment', 'formidable' ), $action_ops ); |
| 21 | 21 | } |
| @@ -86,8 +86,14 @@ | ||
| 86 | 86 | 'gateway' => array(), |
| 87 | 87 | 'credit_card' => '', |
| 88 | 88 | 'billing_first_name' => '', |
| 89 | 89 | 'billing_last_name' => '', |
| 90 | + 'billing_address' => '', | |
| 91 | + 'shipping_email' => '', | |
| 92 | + 'shipping_first_name' => '', | |
| 93 | + 'shipping_last_name' => '', | |
| 94 | + 'shipping_address' => '', | |
| 95 | + 'entry_data_sync' => 'overwrite', | |
| 90 | 96 | ); |
| 91 | 97 | return (array) apply_filters( 'frm_pay_action_defaults', $defaults ); |
| 92 | 98 | } |
| 93 | 99 | |
| @@ -177,8 +183,9 @@ | ||
| 177 | 183 | $field_atts['skipped_fields'] = array( FrmSubmitHelper::FIELD_TYPE ); |
| 178 | 184 | } |
| 179 | 185 | |
| 180 | 186 | $has_field = false; |
| 187 | + // phpcs:disable Generic.WhiteSpace.ScopeIndent | |
| 181 | 188 | ?> |
| 182 | 189 | <?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?> |
| 183 | 190 | <select class="frm_with_left_label" name="<?php echo esc_attr( $this->get_field_name( $field_atts['name'] ) ); ?>" id="<?php echo esc_attr( $this->get_field_id( $field_atts['name'] ) ); ?>"> |
| 184 | 191 | <option value=""><?php esc_html_e( '— Select —' ); ?></option> |
| @@ -199,13 +206,14 @@ | ||
| 199 | 206 | ?> |
| 200 | 207 | <?php // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong ?> |
| 201 | 208 | <option value="<?php echo esc_attr( $field->id ); ?>" <?php selected( $key_exists ? $form_atts['form_action']->post_content[ $field_atts['name'] ] : 0, $field->id ); ?>> |
| 202 | 209 | <?php |
| 203 | - echo esc_attr( FrmAppHelper::truncate( $field->name, 50, 1 ) ); | |
| 210 | + echo esc_html( FrmAppHelper::truncate( $field->name, 50, 1 ) ); | |
| 204 | 211 | |
| 205 | 212 | if ( 'name' === $field->type && isset( $field_atts['name'] ) ) { |
| 206 | 213 | switch ( $field_atts['name'] ) { |
| 207 | 214 | case 'billing_first_name': |
| 215 | + case 'shipping_first_name': | |
| 208 | 216 | echo ' ('; |
| 209 | 217 | esc_html_e( 'First', 'formidable' ); |
| 210 | 218 | echo ')'; |
| 211 | 219 | break; |
| @@ -210,8 +218,9 @@ | ||
| 210 | 218 | echo ')'; |
| 211 | 219 | break; |
| 212 | 220 | |
| 213 | 221 | case 'billing_last_name': |
| 222 | + case 'shipping_last_name': | |
| 214 | 223 | echo ' ('; |
| 215 | 224 | esc_html_e( 'Last', 'formidable' ); |
| 216 | 225 | echo ')'; |
| 217 | 226 | break; |
| @@ -236,8 +245,9 @@ | ||
| 236 | 245 | } |
| 237 | 246 | ?> |
| 238 | 247 | </select> |
| 239 | 248 | <?php |
| 249 | + // phpcs:enable Generic.WhiteSpace.ScopeIndent | |
| 240 | 250 | } |
| 241 | 251 | |
| 242 | 252 | public static function get_single_action_type( $action_id, $type = '' ) { |
| 243 | 253 | /** |