Skip to content

Fixed fees format on cart and checkout#558

Merged
Soare-Robert-Daniel merged 5 commits intodevelopmentfrom
bugfix/230
Apr 14, 2026
Merged

Fixed fees format on cart and checkout#558
Soare-Robert-Daniel merged 5 commits intodevelopmentfrom
bugfix/230

Conversation

@girishpanchal30
Copy link
Copy Markdown
Contributor

Summary

Added the fees to WooCommerce's fees_api to remove the prefix number from the label and generate the unique ID for fees.

Check before Pull Request is ready:

Closes #230

@girishpanchal30 girishpanchal30 requested a review from Copilot April 6, 2026 05:44
@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Apr 6, 2026
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Apr 6, 2026
@pirate-bot
Copy link
Copy Markdown
Contributor

pirate-bot commented Apr 6, 2026

Plugin build for d4b4142 is ready 🛎️!

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates how PPOM adds cart/checkout fees in WooCommerce so fee labels don’t include a leading counter (e.g., 1-...) and fees get explicit unique IDs via WooCommerce’s fees_api.

Changes:

  • Removes numeric prefixes from fee labels shown on cart/checkout (fixed fees and matrix/option fees).
  • Switches fee creation to $cart->fees_api()->add_fee() and supplies explicit id values for PPOM fees.
  • Avoids appending empty parentheses to option-fee labels by only adding ({$option_label}) when present.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
inc/woocommerce.php Updates legacy-mode one-time fee labels and adds fees via fees_api with explicit IDs.
inc/prices.php Updates non-legacy cart fee + matrix discount fee labeling and switches fee creation to fees_api with explicit IDs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread inc/prices.php Outdated
@Soare-Robert-Daniel Soare-Robert-Daniel merged commit b102ac7 into development Apr 14, 2026
10 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the bugfix/230 branch April 14, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants