← All changes
|
includes/Admin/views/template-email-notification.php
+19
-25
2.3.0
→
2.4.1
View file →
| @@ -217,54 +217,48 @@ | ||
| 217 | 217 | $email_address = empty( $email_address ) && ! empty( $all_data['form_fields_info_arr']['email'] ) ? $all_data['form_fields_info_arr']['email'] : $email_address; |
| 218 | 218 | ?> |
| 219 | 219 | <p style="color: rgba(110, 88, 247, 1); font-size: 24px; color: rgba(43, 39, 72, 1); font-weight: 400; margin: 0 0 14px; line-height: 1.2em;" class="bp-email"><?php echo esc_html( $email_address ); ?></p> |
| 220 | 220 | <?php |
| 221 | + $email_rows = array(); | |
| 222 | + | |
| 221 | 223 | foreach ( $all_data['form_fields_info_arr'] as $key => $field ) { |
| 222 | - if ( $key === 'is_payment_split_payment' ) { | |
| 223 | - $is_payment_split_payment = 1; | |
| 224 | - } | |
| 225 | - | |
| 226 | - if ( $key === 'split_payment_installment_iteration' ) { | |
| 227 | - $key = 'installment_iteration'; | |
| 228 | - } | |
| 229 | - | |
| 230 | 224 | //Hide few fields |
| 231 | 225 | if( $key === 'referer_page_id' || $key === 'referer_widget_id' || $key === 'source' || $key === 'el_form_fields' || |
| 232 | - $key === 'primary_first_name' || $key === 'primary_last_name' || $key === 'primary_email' | |
| 226 | + $key === 'primary_first_name' || $key === 'primary_last_name' || $key === 'primary_email' | |
| 233 | 227 | || $key === 'primary_payment_amount' |
| 234 | 228 | || $key === 'amount_quantity' |
| 235 | - || $key === 'is_woo_layout' | |
| 236 | 229 | || $key === 'woo_product_id' |
| 237 | 230 | || $key === 'woo_product_ids' |
| 238 | 231 | || $key === 'fluentcart_product_id' |
| 239 | 232 | || $key === 'fluentcart_product_ids' |
| 240 | - || $key === 'is_fluentcart_layout' | |
| 241 | 233 | || $key === 'detailed_product_info' |
| 242 | - || $key === 'is_payment_split_payment' | |
| 243 | - || $key === 'split_payment_total_amount' | |
| 244 | - || $key === 'split_payment_total_amount_price_id' | |
| 245 | - || $key === 'split_payment_installment_price_id' | |
| 246 | - || $key === 'recurring_price_id' | |
| 234 | + || $key === 'email_settings' | |
| 247 | 235 | ) { |
| 248 | 236 | if($key === 'referer_page_id'){ |
| 249 | 237 | $referer_content_page_link = !empty($field) ? get_permalink( $field ) : $referer_content_page_link; |
| 250 | 238 | } |
| 251 | - | |
| 239 | + | |
| 252 | 240 | continue; |
| 253 | 241 | } |
| 254 | - | |
| 242 | + | |
| 255 | 243 | $key_formatted = self::better_title_case($key); |
| 256 | - | |
| 244 | + | |
| 257 | 245 | if( $key_formatted === 'Amount' ){ |
| 258 | 246 | $key_formatted = __('Paid', 'better-payment'); |
| 247 | + } | |
| 259 | 248 | |
| 260 | - if ( ! empty( $is_payment_split_payment ) ) { | |
| 261 | - $key_formatted = __('Total Amount', 'better-payment'); | |
| 262 | - } | |
| 263 | - } | |
| 249 | + $email_rows[] = array( | |
| 250 | + 'key' => $key, | |
| 251 | + 'label' => $key_formatted, | |
| 252 | + 'value' => $field, | |
| 253 | + ); | |
| 254 | + } | |
| 255 | + | |
| 256 | + // A Pro payment's own fields (split payments, layout 6) are hidden or relabelled by Pro. | |
| 257 | + foreach ( \Better_Payment\Lite\Classes\PaymentEntitlement::email_rows( $email_rows, 'summary', $all_data['form_fields_info_arr'] ) as $email_row ) { | |
| 264 | 258 | ?> |
| 265 | - <p style="color: rgba(110, 88, 247, 1); font-size: 24px; color: rgba(43, 39, 72, 1); font-weight: 400; margin: 0 0 14px; line-height: 1.2em;" class="bp-content"><?php echo esc_html( $key_formatted ); ?>: <?php echo esc_html( $field ); ?></p> | |
| 266 | - <?php | |
| 259 | + <p style="color: rgba(110, 88, 247, 1); font-size: 24px; color: rgba(43, 39, 72, 1); font-weight: 400; margin: 0 0 14px; line-height: 1.2em;" class="bp-content"><?php echo esc_html( $email_row['label'] ); ?>: <?php echo esc_html( $email_row['value'] ); ?></p> | |
| 260 | + <?php | |
| 267 | 261 | } |
| 268 | 262 | ?> |
| 269 | 263 | </td> |
| 270 | 264 | <?php endif; ?> |