From 28ff2cdcdee78684de23d5cbf1fda12d471f721b Mon Sep 17 00:00:00 2001 From: Derrick Koo Date: Thu, 30 Jan 2025 11:57:21 -0700 Subject: [PATCH] fix(reader-revenue): collect transaction fee settings (#3697) --- includes/wizards/class-reader-revenue-wizard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/wizards/class-reader-revenue-wizard.php b/includes/wizards/class-reader-revenue-wizard.php index a0407b8db0..73f56f1ce7 100644 --- a/includes/wizards/class-reader-revenue-wizard.php +++ b/includes/wizards/class-reader-revenue-wizard.php @@ -399,7 +399,7 @@ public function update_additional_settings( $settings ) { } if ( isset( $settings['allow_covering_fees_label'] ) ) { - update_option( 'newspack_donations_allow_covering_fees_label', intval( $settings['allow_covering_fees_label'] ) ); + update_option( 'newspack_donations_allow_covering_fees_label', sanitize_text_field( $settings['allow_covering_fees_label'] ) ); } if ( isset( $settings['fee_multiplier'] ) ) { update_option( 'newspack_blocks_donate_fee_multiplier', $settings['fee_multiplier'] ); @@ -520,7 +520,7 @@ public function fetch_all_data() { 'woopayments' => $wc_configuration_manager->woopayments_data(), ], 'additional_settings' => [ - 'allow_covering_fees' => boolval( get_option( 'newspack_donations_allow_covering_fees', false ) ), + 'allow_covering_fees' => boolval( get_option( 'newspack_donations_allow_covering_fees', true ) ), 'allow_covering_fees_default' => boolval( get_option( 'newspack_donations_allow_covering_fees_default', false ) ), 'allow_covering_fees_label' => get_option( 'newspack_donations_allow_covering_fees_label', '' ), 'fee_multiplier' => get_option( 'newspack_blocks_donate_fee_multiplier', '2.9' ),