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-.../src/Forms/Fields/PaymentT...
File: Field.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace WPForms\Forms\Fields\PaymentTotal;
[2] Fix | Delete
[3] Fix | Delete
use WPForms\Forms\Fields\Helpers\RequirementsAlerts;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Total payment field.
[7] Fix | Delete
*
[8] Fix | Delete
* @since 1.8.2
[9] Fix | Delete
*/
[10] Fix | Delete
class Field extends \WPForms_Field {
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* Primary class constructor.
[14] Fix | Delete
*
[15] Fix | Delete
* @since 1.8.2
[16] Fix | Delete
*/
[17] Fix | Delete
public function init() {
[18] Fix | Delete
[19] Fix | Delete
// Define field type information.
[20] Fix | Delete
$this->name = esc_html__( 'Total', 'wpforms-lite' );
[21] Fix | Delete
$this->keywords = esc_html__( 'store, ecommerce, pay, payment, sum', 'wpforms-lite' );
[22] Fix | Delete
$this->type = 'payment-total';
[23] Fix | Delete
$this->icon = 'fa-money';
[24] Fix | Delete
$this->order = 110;
[25] Fix | Delete
$this->group = 'payment';
[26] Fix | Delete
[27] Fix | Delete
$this->hooks();
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Hooks.
[32] Fix | Delete
*
[33] Fix | Delete
* @since 1.8.2
[34] Fix | Delete
*/
[35] Fix | Delete
private function hooks() {
[36] Fix | Delete
[37] Fix | Delete
// Define additional field properties.
[38] Fix | Delete
add_filter( "wpforms_field_properties_{$this->type}", [ $this, 'field_properties' ], 5, 3 );
[39] Fix | Delete
[40] Fix | Delete
// Recalculate total for a form.
[41] Fix | Delete
add_filter( 'wpforms_process_filter', [ $this, 'calculate_total' ], 10, 3 );
[42] Fix | Delete
[43] Fix | Delete
// Add classes to the builder field preview.
[44] Fix | Delete
add_filter( 'wpforms_field_preview_class', [ $this, 'preview_field_class' ], 10, 2 );
[45] Fix | Delete
[46] Fix | Delete
// Add new option on the confirmation page.
[47] Fix | Delete
add_action( 'wpforms_form_settings_confirmations_single_after', [ $this, 'add_confirmation_setting' ], 10, 2 );
[48] Fix | Delete
add_action( 'wpforms_lite_form_settings_confirmations_single_after', [ $this, 'add_confirmation_setting' ], 10, 2 );
[49] Fix | Delete
add_action( 'wpforms_frontend_confirmation_message_after', [ $this, 'order_summary_confirmation' ], 10, 4 );
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* Define additional field properties.
[54] Fix | Delete
*
[55] Fix | Delete
* @since 1.8.2
[56] Fix | Delete
*
[57] Fix | Delete
* @param array $properties Field properties.
[58] Fix | Delete
* @param array $field Field data and settings.
[59] Fix | Delete
* @param array $form_data Form data and settings.
[60] Fix | Delete
*
[61] Fix | Delete
* @return array
[62] Fix | Delete
*/
[63] Fix | Delete
public function field_properties( $properties, $field, $form_data ) {
[64] Fix | Delete
[65] Fix | Delete
// Input Primary: initial total is always zero.
[66] Fix | Delete
$properties['inputs']['primary']['attr']['value'] = '0';
[67] Fix | Delete
[68] Fix | Delete
// Input Primary: add class for targeting calculations.
[69] Fix | Delete
$properties['inputs']['primary']['class'][] = 'wpforms-payment-total';
[70] Fix | Delete
[71] Fix | Delete
// Input Primary: add data attribute if total is required.
[72] Fix | Delete
if ( ! empty( $field['required'] ) ) {
[73] Fix | Delete
$properties['inputs']['primary']['data']['rule-required-payment'] = true;
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
// Check size.
[77] Fix | Delete
if ( ! empty( $field['size'] ) ) {
[78] Fix | Delete
$properties['container']['class'][] = 'wpforms-field-' . esc_attr( $field['size'] );
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
// Input Primary: add class for targeting summary.
[82] Fix | Delete
if ( $this->is_summary_enabled( $field ) ) {
[83] Fix | Delete
$properties['container']['class'][] = 'wpforms-summary-enabled';
[84] Fix | Delete
}
[85] Fix | Delete
[86] Fix | Delete
// Unset for attribute for label.
[87] Fix | Delete
unset( $properties['label']['attr']['for'] );
[88] Fix | Delete
[89] Fix | Delete
return $properties;
[90] Fix | Delete
}
[91] Fix | Delete
[92] Fix | Delete
/**
[93] Fix | Delete
* Whether current field can be populated dynamically.
[94] Fix | Delete
*
[95] Fix | Delete
* @since 1.8.2
[96] Fix | Delete
*
[97] Fix | Delete
* @param array $properties Field properties.
[98] Fix | Delete
* @param array $field Current field specific data.
[99] Fix | Delete
*
[100] Fix | Delete
* @return bool
[101] Fix | Delete
*/
[102] Fix | Delete
public function is_dynamic_population_allowed( $properties, $field ) {
[103] Fix | Delete
[104] Fix | Delete
return false;
[105] Fix | Delete
}
[106] Fix | Delete
[107] Fix | Delete
/**
[108] Fix | Delete
* Whether current field can be populated dynamically.
[109] Fix | Delete
*
[110] Fix | Delete
* @since 1.8.2
[111] Fix | Delete
*
[112] Fix | Delete
* @param array $properties Field properties.
[113] Fix | Delete
* @param array $field Current field specific data.
[114] Fix | Delete
*
[115] Fix | Delete
* @return bool
[116] Fix | Delete
*/
[117] Fix | Delete
public function is_fallback_population_allowed( $properties, $field ) {
[118] Fix | Delete
[119] Fix | Delete
return false;
[120] Fix | Delete
}
[121] Fix | Delete
[122] Fix | Delete
/**
[123] Fix | Delete
* Do not trust the posted total since that relies on javascript.
[124] Fix | Delete
*
[125] Fix | Delete
* Instead we re-calculate server side.
[126] Fix | Delete
*
[127] Fix | Delete
* @since 1.8.2
[128] Fix | Delete
*
[129] Fix | Delete
* @param array $fields List of fields with their data.
[130] Fix | Delete
* @param array $entry Submitted form data.
[131] Fix | Delete
* @param array $form_data Form data and settings.
[132] Fix | Delete
*
[133] Fix | Delete
* @return array
[134] Fix | Delete
*/
[135] Fix | Delete
public function calculate_total( $fields, $entry, $form_data ) {
[136] Fix | Delete
[137] Fix | Delete
return self::calculate_total_static( $fields, $entry, $form_data );
[138] Fix | Delete
}
[139] Fix | Delete
[140] Fix | Delete
/**
[141] Fix | Delete
* Static version of calculate_total().
[142] Fix | Delete
*
[143] Fix | Delete
* @since 1.8.4
[144] Fix | Delete
*
[145] Fix | Delete
* @param array $fields List of fields with their data.
[146] Fix | Delete
* @param array $entry Submitted form data.
[147] Fix | Delete
* @param array $form_data Form data and settings.
[148] Fix | Delete
*
[149] Fix | Delete
* @return array
[150] Fix | Delete
*/
[151] Fix | Delete
public static function calculate_total_static( $fields, $entry, $form_data ) {
[152] Fix | Delete
[153] Fix | Delete
if ( ! is_array( $fields ) ) {
[154] Fix | Delete
return $fields;
[155] Fix | Delete
}
[156] Fix | Delete
[157] Fix | Delete
// At this point we have passed processing and validation, so we know
[158] Fix | Delete
// the amounts in $fields are safe to use.
[159] Fix | Delete
$total = wpforms_get_total_payment( $fields );
[160] Fix | Delete
$amount = wpforms_sanitize_amount( $total );
[161] Fix | Delete
[162] Fix | Delete
foreach ( $fields as $id => $field ) {
[163] Fix | Delete
if ( ! empty( $field['type'] ) && $field['type'] === 'payment-total' ) {
[164] Fix | Delete
$fields[ $id ]['value'] = wpforms_format_amount( $amount, true );
[165] Fix | Delete
$fields[ $id ]['amount'] = wpforms_format_amount( $amount );
[166] Fix | Delete
$fields[ $id ]['amount_raw'] = $amount;
[167] Fix | Delete
}
[168] Fix | Delete
}
[169] Fix | Delete
[170] Fix | Delete
return $fields;
[171] Fix | Delete
}
[172] Fix | Delete
[173] Fix | Delete
/**
[174] Fix | Delete
* Field options panel inside the builder.
[175] Fix | Delete
*
[176] Fix | Delete
* @since 1.8.2
[177] Fix | Delete
*
[178] Fix | Delete
* @param array $field Field data and settings.
[179] Fix | Delete
*/
[180] Fix | Delete
public function field_options( $field ) {
[181] Fix | Delete
/*
[182] Fix | Delete
* Basic field options.
[183] Fix | Delete
*/
[184] Fix | Delete
[185] Fix | Delete
// Options open markup.
[186] Fix | Delete
$args = [
[187] Fix | Delete
'markup' => 'open',
[188] Fix | Delete
];
[189] Fix | Delete
[190] Fix | Delete
$this->field_option( 'basic-options', $field, $args );
[191] Fix | Delete
[192] Fix | Delete
// Label.
[193] Fix | Delete
$this->field_option( 'label', $field );
[194] Fix | Delete
[195] Fix | Delete
// Description.
[196] Fix | Delete
$this->field_option( 'description', $field );
[197] Fix | Delete
[198] Fix | Delete
// Enable Summary.
[199] Fix | Delete
$this->summary_option( $field );
[200] Fix | Delete
[201] Fix | Delete
// Summary Notice.
[202] Fix | Delete
$this->summary_option_notice( $field );
[203] Fix | Delete
[204] Fix | Delete
// Required toggle.
[205] Fix | Delete
$this->field_option( 'required', $field );
[206] Fix | Delete
[207] Fix | Delete
// Options close markup.
[208] Fix | Delete
$args = [
[209] Fix | Delete
'markup' => 'close',
[210] Fix | Delete
];
[211] Fix | Delete
[212] Fix | Delete
$this->field_option( 'basic-options', $field, $args );
[213] Fix | Delete
[214] Fix | Delete
/*
[215] Fix | Delete
* Advanced field options.
[216] Fix | Delete
*/
[217] Fix | Delete
[218] Fix | Delete
// Options open markup.
[219] Fix | Delete
$args = [
[220] Fix | Delete
'markup' => 'open',
[221] Fix | Delete
];
[222] Fix | Delete
[223] Fix | Delete
$this->field_option( 'advanced-options', $field, $args );
[224] Fix | Delete
[225] Fix | Delete
// Size.
[226] Fix | Delete
$this->field_option( 'size', $field, [ 'exclude' => [ 'small' ] ] );
[227] Fix | Delete
[228] Fix | Delete
// Custom CSS classes.
[229] Fix | Delete
$this->field_option( 'css', $field );
[230] Fix | Delete
[231] Fix | Delete
// Hide label.
[232] Fix | Delete
$this->field_option( 'label_hide', $field );
[233] Fix | Delete
[234] Fix | Delete
// Options close markup.
[235] Fix | Delete
$args = [
[236] Fix | Delete
'markup' => 'close',
[237] Fix | Delete
];
[238] Fix | Delete
[239] Fix | Delete
$this->field_option( 'advanced-options', $field, $args );
[240] Fix | Delete
}
[241] Fix | Delete
[242] Fix | Delete
/**
[243] Fix | Delete
* Field preview inside the builder.
[244] Fix | Delete
*
[245] Fix | Delete
* @since 1.8.2
[246] Fix | Delete
*
[247] Fix | Delete
* @param array $field Field data and settings.
[248] Fix | Delete
*/
[249] Fix | Delete
public function field_preview( $field ) {
[250] Fix | Delete
[251] Fix | Delete
// Label.
[252] Fix | Delete
$this->field_preview_option( 'label', $field );
[253] Fix | Delete
[254] Fix | Delete
list( $items, $foot, $total_width ) = $this->prepare_builder_preview_data();
[255] Fix | Delete
[256] Fix | Delete
// Summary preview.
[257] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
[258] Fix | Delete
echo wpforms_render(
[259] Fix | Delete
'fields/total/summary-preview',
[260] Fix | Delete
[
[261] Fix | Delete
'items' => $items,
[262] Fix | Delete
'foot' => $foot,
[263] Fix | Delete
'total_width' => $total_width,
[264] Fix | Delete
],
[265] Fix | Delete
true
[266] Fix | Delete
);
[267] Fix | Delete
[268] Fix | Delete
// Primary field.
[269] Fix | Delete
echo '<div class="wpforms-total-amount">' . esc_html( wpforms_format_amount( 0, true ) ) . '</div>';
[270] Fix | Delete
[271] Fix | Delete
// Description.
[272] Fix | Delete
$this->field_preview_option( 'description', $field );
[273] Fix | Delete
}
[274] Fix | Delete
[275] Fix | Delete
/**
[276] Fix | Delete
* Field display on the form front-end.
[277] Fix | Delete
*
[278] Fix | Delete
* @since 1.8.2
[279] Fix | Delete
*
[280] Fix | Delete
* @param array $field Field data and settings.
[281] Fix | Delete
* @param array $deprecated Deprecated, not used parameter.
[282] Fix | Delete
* @param array $form_data Form data and settings.
[283] Fix | Delete
*/
[284] Fix | Delete
public function field_display( $field, $deprecated, $form_data ) {
[285] Fix | Delete
[286] Fix | Delete
$primary = $field['properties']['inputs']['primary'];
[287] Fix | Delete
$type = ! empty( $field['required'] ) ? 'text' : 'hidden';
[288] Fix | Delete
$attrs = $primary['attr'];
[289] Fix | Delete
[290] Fix | Delete
if ( ! empty( $field['required'] ) ) {
[291] Fix | Delete
$attrs['style'] = 'position:absolute!important;clip:rect(0,0,0,0)!important;height:1px!important;width:1px!important;border:0!important;overflow:hidden!important;padding:0!important;margin:0!important;';
[292] Fix | Delete
$attrs['readonly'] = 'readonly';
[293] Fix | Delete
}
[294] Fix | Delete
[295] Fix | Delete
// aria-errormessage attribute is not allowed for hidden inputs.
[296] Fix | Delete
unset( $attrs['aria-errormessage'] );
[297] Fix | Delete
[298] Fix | Delete
$is_summary_enabled = $this->is_summary_enabled( $field );
[299] Fix | Delete
[300] Fix | Delete
if ( $is_summary_enabled ) {
[301] Fix | Delete
[302] Fix | Delete
list( $items, $foot, $total_width ) = $this->prepare_payment_fields_data( $form_data );
[303] Fix | Delete
[304] Fix | Delete
// Summary preview.
[305] Fix | Delete
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
[306] Fix | Delete
echo wpforms_render(
[307] Fix | Delete
'fields/total/summary-preview',
[308] Fix | Delete
[
[309] Fix | Delete
'items' => $items,
[310] Fix | Delete
'foot' => $foot,
[311] Fix | Delete
'total_width' => $total_width,
[312] Fix | Delete
],
[313] Fix | Delete
true
[314] Fix | Delete
);
[315] Fix | Delete
}
[316] Fix | Delete
[317] Fix | Delete
// Always print total to cover a case when field is embedded into Layout column with 25% width.
[318] Fix | Delete
$hidden_style = $is_summary_enabled ? 'display:none' : '';
[319] Fix | Delete
[320] Fix | Delete
// This displays the total the user sees.
[321] Fix | Delete
printf(
[322] Fix | Delete
'<div class="wpforms-payment-total" style="%1$s">%2$s</div>',
[323] Fix | Delete
esc_attr( $hidden_style ),
[324] Fix | Delete
esc_html( wpforms_format_amount( 0, true ) )
[325] Fix | Delete
);
[326] Fix | Delete
[327] Fix | Delete
// Hidden input for processing.
[328] Fix | Delete
printf(
[329] Fix | Delete
'<input type="%s" %s>',
[330] Fix | Delete
esc_attr( $type ),
[331] Fix | Delete
wpforms_html_attributes( $primary['id'], $primary['class'], $primary['data'], $attrs ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
[332] Fix | Delete
);
[333] Fix | Delete
}
[334] Fix | Delete
[335] Fix | Delete
/**
[336] Fix | Delete
* Validate field on form submit.
[337] Fix | Delete
*
[338] Fix | Delete
* @since 1.8.2
[339] Fix | Delete
*
[340] Fix | Delete
* @param int $field_id Field ID.
[341] Fix | Delete
* @param string $field_submit Submitted field value (raw data).
[342] Fix | Delete
* @param array $form_data Form data and settings.
[343] Fix | Delete
*/
[344] Fix | Delete
public function validate( $field_id, $field_submit, $form_data ) {
[345] Fix | Delete
[346] Fix | Delete
// Basic required check - If field is marked as required, check for entry data.
[347] Fix | Delete
if ( ! empty( $form_data['fields'][ $field_id ]['required'] ) && ( empty( $field_submit ) || wpforms_sanitize_amount( $field_submit ) <= 0 ) ) {
[348] Fix | Delete
wpforms()->get( 'process' )->errors[ $form_data['id'] ][ $field_id ] = esc_html__( 'Payment is required.', 'wpforms-lite' );
[349] Fix | Delete
}
[350] Fix | Delete
}
[351] Fix | Delete
[352] Fix | Delete
/**
[353] Fix | Delete
* Format and sanitize field.
[354] Fix | Delete
*
[355] Fix | Delete
* @since 1.8.2
[356] Fix | Delete
*
[357] Fix | Delete
* @param int $field_id Field ID.
[358] Fix | Delete
* @param string $field_submit Field value submitted by a user.
[359] Fix | Delete
* @param array $form_data Form data and settings.
[360] Fix | Delete
*/
[361] Fix | Delete
public function format( $field_id, $field_submit, $form_data ) {
[362] Fix | Delete
[363] Fix | Delete
// Define data.
[364] Fix | Delete
$name = ! empty( $form_data['fields'][ $field_id ]['label'] ) ? $form_data['fields'][ $field_id ]['label'] : '';
[365] Fix | Delete
$amount = wpforms_sanitize_amount( $field_submit );
[366] Fix | Delete
[367] Fix | Delete
// Set final field details.
[368] Fix | Delete
wpforms()->get( 'process' )->fields[ $field_id ] = [
[369] Fix | Delete
'name' => sanitize_text_field( $name ),
[370] Fix | Delete
'value' => wpforms_format_amount( $amount, true ),
[371] Fix | Delete
'amount' => wpforms_format_amount( $amount ),
[372] Fix | Delete
'amount_raw' => $amount,
[373] Fix | Delete
'id' => absint( $field_id ),
[374] Fix | Delete
'type' => sanitize_key( $this->type ),
[375] Fix | Delete
];
[376] Fix | Delete
}
[377] Fix | Delete
[378] Fix | Delete
/**
[379] Fix | Delete
* Summary option.
[380] Fix | Delete
*
[381] Fix | Delete
* @since 1.8.7
[382] Fix | Delete
*
[383] Fix | Delete
* @param array $field Field data and settings.
[384] Fix | Delete
*/
[385] Fix | Delete
private function summary_option( array $field ) {
[386] Fix | Delete
[387] Fix | Delete
$is_allowed = RequirementsAlerts::is_order_summary_allowed();
[388] Fix | Delete
[389] Fix | Delete
$toggle_data = [
[390] Fix | Delete
'slug' => 'summary',
[391] Fix | Delete
'value' => $this->is_summary_enabled( $field ),
[392] Fix | Delete
'desc' => esc_html__( 'Enable Summary', 'wpforms-lite' ),
[393] Fix | Delete
'tooltip' => esc_html__( 'Enable order summary for this field.', 'wpforms-lite' ),
[394] Fix | Delete
];
[395] Fix | Delete
[396] Fix | Delete
if ( ! $is_allowed ) {
[397] Fix | Delete
$toggle_data['attrs'] = [ 'disabled' => 'disabled' ];
[398] Fix | Delete
$toggle_data['control-class'] = 'wpforms-toggle-control-disabled';
[399] Fix | Delete
}
[400] Fix | Delete
[401] Fix | Delete
$output = $this->field_element(
[402] Fix | Delete
'toggle',
[403] Fix | Delete
$field,
[404] Fix | Delete
$toggle_data,
[405] Fix | Delete
false
[406] Fix | Delete
);
[407] Fix | Delete
[408] Fix | Delete
$this->field_element(
[409] Fix | Delete
'row',
[410] Fix | Delete
$field,
[411] Fix | Delete
[
[412] Fix | Delete
'slug' => 'summary',
[413] Fix | Delete
'content' => $output,
[414] Fix | Delete
]
[415] Fix | Delete
);
[416] Fix | Delete
[417] Fix | Delete
if ( ! $is_allowed ) {
[418] Fix | Delete
[419] Fix | Delete
$this->field_element(
[420] Fix | Delete
'row',
[421] Fix | Delete
$field,
[422] Fix | Delete
[
[423] Fix | Delete
'slug' => 'summary_alert',
[424] Fix | Delete
'content' => RequirementsAlerts::get_order_summary_alert(),
[425] Fix | Delete
]
[426] Fix | Delete
);
[427] Fix | Delete
}
[428] Fix | Delete
}
[429] Fix | Delete
[430] Fix | Delete
/**
[431] Fix | Delete
* Summary notice on the options tab.
[432] Fix | Delete
*
[433] Fix | Delete
* @since 1.8.7
[434] Fix | Delete
*
[435] Fix | Delete
* @param array $field Field data and settings.
[436] Fix | Delete
*/
[437] Fix | Delete
private function summary_option_notice( array $field ) {
[438] Fix | Delete
[439] Fix | Delete
$notice = __( 'Example data is shown in the form editor. Actual products and totals will be displayed when you preview or embed your form.', 'wpforms-lite' );
[440] Fix | Delete
$is_notice_hidden = ! $this->is_summary_enabled( $field ) ? 'wpforms-hidden' : '';
[441] Fix | Delete
[442] Fix | Delete
printf(
[443] Fix | Delete
'<div class="wpforms-alert-info wpforms-alert wpforms-total-summary-alert %1$s">
[444] Fix | Delete
<p>%2$s</p>
[445] Fix | Delete
</div>',
[446] Fix | Delete
esc_attr( $is_notice_hidden ),
[447] Fix | Delete
esc_html( $notice )
[448] Fix | Delete
);
[449] Fix | Delete
}
[450] Fix | Delete
[451] Fix | Delete
/**
[452] Fix | Delete
* Determine if summary option is enabled.
[453] Fix | Delete
*
[454] Fix | Delete
* @since 1.8.7
[455] Fix | Delete
*
[456] Fix | Delete
* @param array $field Field data and settings.
[457] Fix | Delete
*/
[458] Fix | Delete
private function is_summary_enabled( array $field ) {
[459] Fix | Delete
[460] Fix | Delete
return ! empty( $field['summary'] );
[461] Fix | Delete
}
[462] Fix | Delete
[463] Fix | Delete
/**
[464] Fix | Delete
* Prepare fake fields data for builder preview.
[465] Fix | Delete
*
[466] Fix | Delete
* @since 1.8.7
[467] Fix | Delete
*
[468] Fix | Delete
* @return array
[469] Fix | Delete
*/
[470] Fix | Delete
private function prepare_builder_preview_data(): array {
[471] Fix | Delete
[472] Fix | Delete
$items = [
[473] Fix | Delete
[
[474] Fix | Delete
'label' => __( 'Example Product 1', 'wpforms-lite' ),
[475] Fix | Delete
'quantity' => 3,
[476] Fix | Delete
'amount' => wpforms_format_amount( 30, true ),
[477] Fix | Delete
'is_hidden' => false,
[478] Fix | Delete
],
[479] Fix | Delete
[
[480] Fix | Delete
'label' => __( 'Example Product 2', 'wpforms-lite' ),
[481] Fix | Delete
'quantity' => 2,
[482] Fix | Delete
'amount' => wpforms_format_amount( 20, true ),
[483] Fix | Delete
'is_hidden' => false,
[484] Fix | Delete
],
[485] Fix | Delete
[
[486] Fix | Delete
'label' => __( 'Example Product 3', 'wpforms-lite' ),
[487] Fix | Delete
'quantity' => 1,
[488] Fix | Delete
'amount' => wpforms_format_amount( 10, true ),
[489] Fix | Delete
'is_hidden' => false,
[490] Fix | Delete
],
[491] Fix | Delete
];
[492] Fix | Delete
[493] Fix | Delete
$total = 60;
[494] Fix | Delete
[495] Fix | Delete
/**
[496] Fix | Delete
* Allow to filter items in the footer on the order summary table (builder screen).
[497] Fix | Delete
*
[498] Fix | Delete
* @since 1.8.7
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function