Title: why str_replace &#8216;https&#8217; to &#8216;http&#8217; the redirect_url ?
Last modified: October 4, 2017

---

# why str_replace ‘https’ to ‘http’ the redirect_url ?

 *  [Pratham](https://wordpress.org/support/users/pratham2003/)
 * (@pratham2003)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/why-str_replace-https-to-http-the-redirect_url/)
 * Hi,
 * I came across the following line in code when we noticed out checkout stopped
   working and called the CCAvenue support who told us our website was sending the
   redirect_url as HTTP even though we had moved our website to HTTPS.
 * `$this->notify_url = str_replace( 'https:', 'http:', home_url( '/wc-api/WC_nilesh_Ccave'));`
 * Can you please let us know if there is a specific reason you are forcing HTTP
   on the return URL? It seems to be already causing issues for a some of your users
   who are on HTTPS and it instructs CCAvenue to transmit over HTTP which is insecure.
    -  This topic was modified 8 years, 10 months ago by [Pratham](https://wordpress.org/support/users/pratham2003/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [nilesh0308](https://wordpress.org/support/users/nilesh0308/)
 * (@nilesh0308)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/why-str_replace-https-to-http-the-redirect_url/#post-9561302)
 * Hello Pratham,
 * sorry for your inconvenience I have updated my code can u please download the
   latest version for this plugin and check once.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘why str_replace ‘https’ to ‘http’ the redirect_url ?’ is closed to new
replies.

 * ![](https://ps.w.org/ccavanue-woocommerce-payment-getway/assets/icon-128x128.
   png?rev=1193368)
 * [CCAvenue Payment Gateway for WooCommerce](https://wordpress.org/plugins/ccavanue-woocommerce-payment-getway/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ccavanue-woocommerce-payment-getway/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ccavanue-woocommerce-payment-getway/)
 * [Active Topics](https://wordpress.org/support/plugin/ccavanue-woocommerce-payment-getway/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ccavanue-woocommerce-payment-getway/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ccavanue-woocommerce-payment-getway/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [nilesh0308](https://wordpress.org/support/users/nilesh0308/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/why-str_replace-https-to-http-the-redirect_url/#post-9561302)
 * Status: not resolved