Skip to content

Commit

Permalink
fix(reader-revenue): collect transaction fee settings (#3697)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkoo authored Jan 30, 2025
1 parent 3b27716 commit 28ff2cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/wizards/class-reader-revenue-wizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] );
Expand Down Expand Up @@ -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' ),
Expand Down

0 comments on commit 28ff2cd

Please sign in to comment.