Fix/sold 62 kolari vision price fix#102
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis release (1.2.4) contains two key bug fixes for price handling in the HelloExtend WooCommerce plugin. The cart price update logic now runs at a much higher hook priority (99999), skips admin contexts, and correctly sets both product price and regular price while clearing sale price only when extend data is present. Separately, the order payload construction for line items was corrected to avoid double-scaling prices to cents. Plugin version, stable tag, and changelog metadata were updated to document these fixes. Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@helloextend-protection/helloextend-protection.php`:
- Line 19: The plugin header declares Version: 1.2.4 but the runtime constant
HELLOEXTEND_PROTECTION_VERSION is still set to 1.1.0; update the value of the
HELLOEXTEND_PROTECTION_VERSION constant in helloextend-protection.php to match
the header version (1.2.4) so runtime and header stay consistent, and ensure any
usages of HELLOEXTEND_PROTECTION_VERSION elsewhere (e.g., in update checks or
admin notices) will now reflect the correct version.
In `@helloextend-protection/includes/class-helloextend-global.php`:
- Around line 291-293: Replace the empty() check that skips valid zero/"0"
prices by checking presence and numeric-ness instead: locate the conditional
that checks $cart_item['extendData']['price'] (in class HelloExtend_Global,
method handling cart item price) and change the guard from if
(!empty($cart_item['extendData']['price'])) to a check that allows 0 values,
e.g. if (isset($cart_item['extendData']['price']) &&
is_numeric($cart_item['extendData']['price'])) so zero-cent plans are accepted
and then continue to round/convert the price as before.
In `@helloextend-protection/readme.txt`:
- Around line 83-84: The changelog entry text "Decreased priority for warranty
price hook" is misleading because the code sets the hook priority to 99999
(which makes it run later/higher numeric priority); update the wording to
accurately reflect the implementation — e.g. "Increased numeric priority for
warranty price hook so it executes later (priority 99999) / Moved warranty price
hook to run later so plan prices are set correctly" — edit the readme changelog
line that references the warranty price hook to one of these clearer phrasings.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 864dd0f4-09fc-4194-a9d2-0f36c2ddd30e
📒 Files selected for processing (4)
helloextend-protection/helloextend-protection.phphelloextend-protection/includes/class-helloextend-global.phphelloextend-protection/includes/class-helloextend-protection-orders.phphelloextend-protection/readme.txt
jm-extend
left a comment
There was a problem hiding this comment.
i agree with the coderabbit findings. some are less critical than others. i'll leave it up to you.
Summary by CodeRabbit
Release Notes – Version 1.2.4
New Features
Bug Fixes