-
Notifications
You must be signed in to change notification settings - Fork 146
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
tweak: for release 4.0.12 #1489
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -384,11 +384,11 @@ function wpuf_tax_rate_country_state( $country, $state ) { | |
continue; | ||
} | ||
if ( $rate['state'] === $state && $rate['country'] === $country ) { | ||
$tax_amount = $rate['rate']; | ||
$tax_amount = ! empty( $rate['rate'] ) ? $rate['rate'] : 0; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential issue with handling zero tax rates At line 387, the condition |
||
} | ||
|
||
if ( intval( $tax_amount ) === 0 && $rate['country'] === $country && 'country_wide' === $rate['state'] ) { | ||
$tax_amount = $rate['rate']; | ||
$tax_amount = ! empty( $rate['rate'] ) ? $rate['rate'] : 0; | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Appsero Library Inclusion May Be Incomplete
The Appsero library isn't listed in
composer.json
, and no globalrequire
orinclude
statements were found. Ensure that the Appsero library is correctly autoloaded through another mechanism or consider adding it as a Composer dependency to prevent potential runtime issues.🔗 Analysis chain
Verify Appsero library inclusion and simplify constructor.
The constructor has been simplified by removing the conditional check for
Appsero\Client
and therequire_once
statement. While this improves code cleanliness, it's crucial to ensure that the Appsero library is properly included elsewhere in the project.Please confirm that the Appsero library is included in the project's autoloading mechanism or through another means. Run the following script to check for Appsero inclusion:
The removal of commented-out code for redundant initialization is a good practice and improves code readability.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 1016