Skip to content
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

removes unnecessary parameters from success callback #45

Closed

Conversation

Taiteilija
Copy link
Collaborator

No description provided.

$url->setSuccess( $callbacks->getSuccess() . '?refund_callback=success&refund_unique_id=' . $refund_unique_id . '&order_id=' . $order_id )
->setCancel( $callbacks->getSuccess() . '?refund_callback=cancel&refund_unique_id=' . $refund_unique_id . '&order_id=' . $order_id );
$url->setSuccess( $callbacks->getSuccess() . '&refund_callback=success&refund_unique_id=' . $refund_unique_id . '&order_id=' . $order_id )
->setCancel( $callbacks->getSuccess() . '&refund_callback=cancel&refund_unique_id=' . $refund_unique_id . '&order_id=' . $order_id );
Copy link
Contributor

Choose a reason for hiding this comment

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

Thease changes will break url if there's no paramaeters present.
This need to check if there's query parameters or not in url, and then add either ? or & before query additional parameters.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@VuorelaJ-P Is there any built-in WP functionality for adding parameters to an url?

@Taiteilija Taiteilija closed this Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants