Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 136 #137

Merged
merged 1 commit into from
May 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions includes/class-alg-wc-checkout-fees.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function __construct() {

// Modify stripe parameters and set payment page as checkout in order to enable Stripe to be initialized.
add_filter( 'wc_stripe_params', array( $this, 'modify_stripe_params' ) );

// check if subscriptions is enabled.
if ( in_array( 'woocommerce-subscriptions/woocommerce-subscriptions.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ), true ) ) {
// use this hook to add our fees in the recurring total displayed in the cart for subscriptions.
Expand Down Expand Up @@ -552,7 +552,7 @@ public function calculate_the_fee( $args, $final_fee_to_add, $total_in_cart, $fe
}
}
// Final calculations.
$final_fee_to_add += $new_fee;
$final_fee_to_add += (float) $new_fee;
if ( 'percent' === $fee_type && 'yes' === $args['do_round'] ) {
// default the precision to 0 if it has been left blanks.
$precision = '' === $args['precision'] ? 0 : $args['precision'];
Expand Down