Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/wpforms-.../template.../fields/total
File: summary-preview.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* The Order Summary preview for the Total payment field.
[2] Fix | Delete
*
[3] Fix | Delete
* @since 1.8.7
[4] Fix | Delete
*
[5] Fix | Delete
* @var array $items Order items.
[6] Fix | Delete
* @var array $foot Order footer (subtotal, discount, total).
[7] Fix | Delete
* @var string $total_width Total width.
[8] Fix | Delete
*/
[9] Fix | Delete
[10] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[11] Fix | Delete
exit;
[12] Fix | Delete
}
[13] Fix | Delete
[14] Fix | Delete
$rows_html = '';
[15] Fix | Delete
$total_width = $total_width ? 'width:' . $total_width . 'ch;' : '';
[16] Fix | Delete
$fields = array_merge( (array) $items, (array) $foot );
[17] Fix | Delete
[18] Fix | Delete
// Display the placeholder by default.
[19] Fix | Delete
$is_placeholder_visible = true;
[20] Fix | Delete
[21] Fix | Delete
// $context is set for the smart tag.
[22] Fix | Delete
if ( isset( $context ) ) {
[23] Fix | Delete
$is_placeholder_visible = empty( $items );
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
// Go through table items (rows).
[27] Fix | Delete
foreach ( $fields as $field ) :
[28] Fix | Delete
[29] Fix | Delete
// Open a row.
[30] Fix | Delete
$rows_html .= sprintf(
[31] Fix | Delete
'<tr %1$s %2$s>',
[32] Fix | Delete
wpforms_html_attributes( '', isset( $field['class'] ) ? (array) $field['class'] : [] , $field['data'] ?? [] ),
[33] Fix | Delete
! empty( $field['is_hidden'] ) ? 'style="display:none;"' : ''
[34] Fix | Delete
);
[35] Fix | Delete
[36] Fix | Delete
// Item column.
[37] Fix | Delete
$rows_html .= sprintf(
[38] Fix | Delete
'<td class="wpforms-order-summary-item-label" valign="top">%s</td>',
[39] Fix | Delete
wp_kses_post( $field['label'] )
[40] Fix | Delete
);
[41] Fix | Delete
[42] Fix | Delete
// Quantity column.
[43] Fix | Delete
$rows_html .= sprintf(
[44] Fix | Delete
'<td class="wpforms-order-summary-item-quantity" valign="top">%s</td>',
[45] Fix | Delete
esc_html( $field['quantity'] )
[46] Fix | Delete
);
[47] Fix | Delete
[48] Fix | Delete
// Price column.
[49] Fix | Delete
$rows_html .= sprintf(
[50] Fix | Delete
'<td class="wpforms-order-summary-item-price" valign="top" style="%1$s">%2$s</td>',
[51] Fix | Delete
esc_attr( $total_width ),
[52] Fix | Delete
esc_html( $field['amount'] )
[53] Fix | Delete
);
[54] Fix | Delete
[55] Fix | Delete
// Close a row.
[56] Fix | Delete
$rows_html .= '</tr>';
[57] Fix | Delete
[58] Fix | Delete
// If a product item is not hidden (pre-selected), then hide the placeholder.
[59] Fix | Delete
if ( $is_placeholder_visible && isset( $field['is_hidden'] ) && $field['is_hidden'] === false ) {
[60] Fix | Delete
$is_placeholder_visible = false;
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
endforeach;
[64] Fix | Delete
[65] Fix | Delete
$placeholder_display = $is_placeholder_visible ? 'display: table-row;' : 'display: none;';
[66] Fix | Delete
$placeholder_classes = $is_placeholder_visible ? 'wpforms-order-summary-placeholder' : 'wpforms-order-summary-placeholder wpforms-order-summary-placeholder-hidden';
[67] Fix | Delete
[68] Fix | Delete
?>
[69] Fix | Delete
<div class="wpforms-order-summary-container">
[70] Fix | Delete
<table class="wpforms-order-summary-preview" cellpadding="0" cellspacing="0" width="100%" role="presentation">
[71] Fix | Delete
<caption style="display: none;"><?php esc_html_e( 'Order Summary', 'wpforms-lite' ); ?></caption>
[72] Fix | Delete
<thead>
[73] Fix | Delete
<tr>
[74] Fix | Delete
<th class="wpforms-order-summary-item-label" valign="top"><?php esc_html_e( 'Item', 'wpforms-lite' ); ?></th>
[75] Fix | Delete
<th class="wpforms-order-summary-item-quantity" valign="top"><?php esc_html_e( 'Quantity', 'wpforms-lite' ); ?></th>
[76] Fix | Delete
<th class="wpforms-order-summary-item-price" valign="top" style="<?php echo esc_attr( $total_width ); ?>"><?php esc_html_e( 'Total', 'wpforms-lite' ); ?></th>
[77] Fix | Delete
</tr>
[78] Fix | Delete
</thead>
[79] Fix | Delete
<tbody>
[80] Fix | Delete
<tr class="<?php echo esc_attr( $placeholder_classes ); ?>" style="<?php echo esc_attr( $placeholder_display ); ?>">
[81] Fix | Delete
<td colspan="3" valign="top"><?php echo esc_html__( 'There are no products selected.', 'wpforms-lite' ); ?></td>
[82] Fix | Delete
</tr>
[83] Fix | Delete
<?php echo $rows_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
[84] Fix | Delete
</tbody>
[85] Fix | Delete
</table>
[86] Fix | Delete
</div>
[87] Fix | Delete
[88] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function