Skip to content

Commit

Permalink
refactor: revert the saving check to prevent the delete of pro fields…
Browse files Browse the repository at this point in the history
… for Free users
  • Loading branch information
Soare-Robert-Daniel committed Sep 26, 2024
1 parent c1598fc commit e1c9e89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function ppom_admin_save_form_meta() {
$product_meta = array_filter(
$product_meta,
function( $pm ) {
return ! empty( $pm['type'] ) && ! empty( $pm['data_name'] );
return ! empty( $pm['type'] ) || ! empty( $pm['data_name'] );
}
);
$product_meta = json_encode( $product_meta );
Expand Down Expand Up @@ -450,7 +450,7 @@ function ppom_admin_update_form_meta() {
$product_meta = array_filter(
$product_meta,
function( $pm ) {
return ! empty( $pm['type'] ) && ! empty( $pm['data_name'] ) && ! empty( $pm['ppom_id'] );
return ! empty( $pm['type'] ) || ! empty( $pm['data_name'] );
}
);
$product_meta = json_encode( $product_meta );
Expand Down

0 comments on commit e1c9e89

Please sign in to comment.