-
Notifications
You must be signed in to change notification settings - Fork 92
gspc-remove-price-from-addon-display.php: Fixed a typo with the snippet.
#1095
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
Conversation
WalkthroughThe change corrects a variable reference in a filter callback for 'gspc_show_addon_price'. The condition that checks for a specific CSS class now references the correct variable, ensuring that the logic for hiding addon prices based on the CSS class 'gspc-remove-price' functions as intended. No other control flow or return values are altered. Changes
Sequence Diagram(s)sequenceDiagram
participant WP as WordPress
participant Callback as gspc_show_addon_price filter callback
WP->>Callback: Apply 'gspc_show_addon_price' filter with $show_price, $product_field
Callback->>Callback: Check if $product_field->cssClass contains 'gspc-remove-price'
alt Class found
Callback-->>WP: return false (hide addon price)
else Class not found
Callback-->>WP: return $show_price (default behavior)
end
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Context
💬 Slack: https://gravitywiz.slack.com/archives/D042URGA4QM/p1746440777693109
(Reported by Samuel)
Summary
Typo with the snippet
$field->cssClassIs supposed to be
$product_field ->cssClass