Skip to content

Commit e1017d3

Browse files
authored
release: fixes
- Fixed a PHP warning when saving a Font Picker meta field in the backend - Fixed an issue where uploaded files appeared twice on the confirmation screen
2 parents 6e4002c + 64fcdaf commit e1017d3

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

inc/admin.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function ppom_admin_product_meta_column( $column, $post_id ) {
3737
if ( $ppom->has_multiple_meta() ) {
3838
$total_items = count( $ppom->meta_id ); // Get the total number of items.
3939
$current_item = 0; // Counter to track the current iteration.
40-
40+
$has_fields = false;
4141
foreach ( $ppom->meta_id as $meta_id ) {
4242
$current_item++; // Increment the counter.
4343

@@ -56,10 +56,13 @@ function ppom_admin_product_meta_column( $column, $post_id ) {
5656
if ( $current_item < $total_items ) {
5757
echo ', ';
5858
}
59-
} else {
60-
echo sprintf( __( '<a class="btn button" href="%1$s">%2$s</a>', 'woocommerce-product-addon' ), esc_url( $ppom_settings_url ), 'Add Fields' );
59+
$has_fields = true;
6160
}
61+
6262
}
63+
if( ! $has_fields ) {
64+
echo sprintf( __( '<a class="btn button" href="%1$s">%2$s</a>', 'woocommerce-product-addon' ), esc_url( $ppom_settings_url ), 'Add Fields' );
65+
}
6366
} elseif ( $ppom->ppom_settings ) {
6467
$url_edit = add_query_arg(
6568
array(

inc/functions.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,11 +1602,6 @@ function ppom_generate_html_for_files( $file_names, $input_type, $item ) {
16021602
$order_html .= '</a>';
16031603
}
16041604

1605-
$order_html .= '<img class="img-thumbnail" style="width:' . esc_attr( ppom_get_thumbs_size() ) . '" src="' . esc_url( $ppom_file_thumb_url ) . '">';
1606-
1607-
if ( $is_image_file ) {
1608-
$order_html .= '</a>';
1609-
}
16101605

16111606
// Requested by Kevin, hiding downloading file button after order on thank you page
16121607
// @since version 16.6

inc/hooks.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,8 @@ function ( $option ) {
607607
function ( $option ) {
608608

609609
// registering for translation
610-
nm_wpml_register( $option['option'], 'PPOM' );
610+
isset( $option['option'] ) && nm_wpml_register( $option['option'], 'PPOM' );
611+
isset( $option['fontdisplay'] ) && nm_wpml_register( $option['fontdisplay'], 'PPOM' );
611612

612613
// if label key set e.g for palettes or price matrix
613614
isset( $option['label'] ) && nm_wpml_register( $option['label'], 'PPOM' );
@@ -618,7 +619,7 @@ function ( $option ) {
618619
return $option;
619620

620621
},
621-
$data['options']
622+
$data['options']
622623
);
623624

624625
}

0 commit comments

Comments
 (0)