-
Notifications
You must be signed in to change notification settings - Fork 31
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
Custom URL routes #154
Comments
Thanks for taking out the time to try out our plugin and logging this. We are looking at this on priority |
Hi @jozefpinter I am having success using the below code:
You will now be able to access the checkout page from However, more changes will still be required to forward the user to this new URL. I will update you here with this information, when available. |
Hello @DarrenWestwood , exactly as you are saying. With your code I can access payment URL via new URL. But I need get of rid of old URL because payment gateway is sending me there. So /wc-api/WC_Gateway_Blockonomics/ is still visible. |
In the callback file here, we can add the following line: Please note, this change will need to be applied after updating the Blockonomics plugin. |
can you update the callback in the plugin to redirect users to nicer URL (bitcoin, btc, crypto, whatever) instead /wc-api/WC_Gateway_Blockonomics/ ? Because I think this is really weird URL. It will help to the plugin. |
@jozefpinter, Could you verify the above changes are working correctly for you as well? We are assessing this option further for possible inclusion into a later release. |
@DarrenWestwood , do you mean the code which goes into the file functions.php ? It is working fine, but you know... it not helps because plugin is sending me to /wc-api/WC_Gateway_Blockonomics/ or the second snippet of code which goes into the plugin? I didnt try it. Because if you update the plugin I will lose my own changes. |
As we are still assessing the viability and compatibility of the changes for all our users, this integration will require more testing before being applied to plugin releases. |
@DarrenWestwood , my website is on localhost. I can't test it. |
You are welcome to download the plugin with the above changes included from here: |
Yes we understand. Just to clarify we want to test if changes @DarrenWestwood mentioned are working. We are seriously considering adding this to the main plugin code soon, but first we need to test a little |
I've added
via Plugin editor as you mentioned. WAIT. Something is wrong here. I'll let you know. UPDATE2: It is sending me at new URL. That's OK. So I've disabled a redirect for 404 Now it is sending me at new URL. Once again. That's OK. but WP is showing a message.
I am not an expert, but it seems new payment URL is a 404 page. UPDATE3:
I click "Test setup" then "Save". It doesn't help. |
Both snippets of code need to be applied for this change to work as desired.
The plugin here has both changes applied in the plugin and is working correctly for me on localhost.
Are you receiving an error message when clicking Test Setup? |
Could you also visit Wordpress Dashboard > Settings > Permalink > and Click Save Changes. This will flush rewrite rules for your website, in case other changes you may have made to rewrite rules are causing the issue. |
|
Thank you @jozefpinter for assisting in testing this feature. |
Thanks @jozefpinter we will try to add this in the upcoming release |
It seems that it is working correctly for me. I've sent some test BTC. I had no issue. But remember, I am on localhost. This is not real environment. |
This merge is deferred until we have a more time / is requested more. Please add a list of test cases to the ticket |
Hello,
my payment URL looks like
http://localhost/wc-api/WC_Gateway_Blockonomics/?show_order=1C8965rf2BP44Krtm2imutAXAfgFwt9Lth
and I want something like this
http://localhost/crypto/?show_order=1C8965rf2BP44Krtm2imutAXAfgFwt9Lth
Replace /wc-api/WC_Gateway_Blockonomics/ with /crypto/. That's all.
My functions.php looks like
Somebody on the internet suggested that $matches[1] doesn't work for external redirects, only internal. But anyways, it doesn't work for me.
I was told to consult this issue with Blockonomics dev Support (Here).
The text was updated successfully, but these errors were encountered: