Open
Description
Description
Currently the check_payment_intent_attached_to_order_succeeded
and check_against_session_processing_order
of class Duplicate_Payment_Prevention_Service
return both an array or void|null, which does not line up with the expected results of the method name. The methods also perform other side actions while checking, such as removing the order from the current session and updating the order based on the intent status.
Relevant lines:
Acceptance criteria
- If the method is checking for something, it should return a bool value. The calling code should then be able to progress with that value.
- The side actions should be removed and should be handled in the progression of the calling code.
Additional context
This was brought up in the discussion here: p1688627901421529-slack-CGGCLBN58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
WC Payments core related issues, where it’s obvious.The issue/PR is related to refactoring.The issue is a good candidate for the first community contribution/for a newcomer to the team.The issue/PR is low priority—not many people are affected or there’s a workaround, etc.This issue/PR represents/solves the technical debt of the project.