Title: Not working over https
Last modified: August 21, 2016

---

# Not working over https

 *  Resolved [Emre](https://wordpress.org/support/users/amboss/)
 * (@amboss)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/)
 * When https is enabled on the site the plugin is not working. It stays at the 
   last view: “Sending your invitation…” and not sending anything.
 * I could not able to see the log for the plugin. Do you have any idea?
 * Thanks,
 * [https://wordpress.org/plugins/wp-social-invitations/](https://wordpress.org/plugins/wp-social-invitations/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641395)
 * Do you have a link where I can check?
 *  Thread Starter [Emre](https://wordpress.org/support/users/amboss/)
 * (@amboss)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641413)
 * You may try at datekiss.com . Currently FORCE_SSL_ADMIN is set as true. Plugin
   works if it is false.
 * In the last view that says “Sending invitations…”, actual address line is https(
   since it is a wp-admin page) but I guess there is a problem with the arguments
   current-url and redirect-url, they are http. I dig out the code but could not
   find the actual location.
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641421)
 * OK so only the backend uses https. In which page I could test the plugin?
 *  Thread Starter [Emre](https://wordpress.org/support/users/amboss/)
 * (@amboss)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641422)
 * I have just added the widget to the footer which you may find at any page.
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641423)
 * Try changing on line 319 of wp-social-invitations.php the following:
 * `wp_localize_script( 'wsi-js', 'WsiMyAjax', array( 'url' => site_url( 'wp-login.
   php' ),'admin_url' => admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce('
   wsi-ajax-nonce' ) ) );`
 * to:
 * `wp_localize_script( 'wsi-js', 'WsiMyAjax', array( 'url' => site_url( 'wp-login.
   php' ),'admin_url' => admin_url( 'admin-ajax.php',https' ), 'nonce' => wp_create_nonce('
   wsi-ajax-nonce' ) ) );`
 * Let me know if its works
 *  Thread Starter [Emre](https://wordpress.org/support/users/amboss/)
 * (@amboss)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641426)
 * I changed the line but it is still not working.
 * Can we try to change redirect_url and current_url arguments to https?
 * PS: I guess there is a typo, so I changed `,https'` to `,'https'` .
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641427)
 * The problem is that the popup need to access the opener screen which is http.
   Javascript blocks requests when frames uses different protocols.
 * I think we can trick the url to let the invitations send but they opener window
   will not be updated saying that the messages were sent.
 * Take a look to:
 *     ```
       $.post(window.opener.WsiMyAjax.admin_url, $('#collect_emails').serialize(), function(response){
       								$('#<?php echo $_GET['widget_id'];?> #<?php echo $provider;?>-provider',window.opener.document).addClass('completed');
       								$('#<?php echo $_GET['widget_id'];?> #wsi_provider',window.opener.document).html('<?php echo ucfirst($provider);?>');
       								$('#<?php echo $_GET['widget_id'];?> .wsi_success',window.opener.document).fadeIn('slow',function(){
   
       								window.self.close();
       							<?php if( isset( $settings['redirect_url']) && $settings['redirect_url'] != '' ) :?>
       								window.opener.location.href = '<?php echo $settings['redirect_url'];?>';
       							<?php endif;?>
       							});
       ```
   
 * We could change the window.opener.WsiMyAjax.admin_url with <?php echo admin_url(‘
   admin-ajax.php’,’https’ );?> and the messages will go but the other parts that
   uses window.openener.document won’t
 * The frontend of your site will remain http?
 *  Thread Starter [Emre](https://wordpress.org/support/users/amboss/)
 * (@amboss)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641429)
 * I have tried changing window.opener.WsiMyAjax.admin_url with <?php echo admin_url(‘
   admin-ajax.php’,’https’ );?> , but it does not help either.
 * I guess I am very good at finding interesting bugs like this one 🙂 I have enabled
   https entirely and the plugin has worked fine since redirect-to is written as
   https as you say. Plugin is also working over http. Enabling https entirely is
   solving the problem, it is in the plans so for the time being I guess I will 
   just wait till then.
 * Thanks for your efforts and your plugin, if anything comes to your mind I will
   be glad to hear.
 *  Plugin Author [Damian](https://wordpress.org/support/users/timersys/)
 * (@timersys)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641430)
 * Np, I will have this in mind, but for now Im afraid that backend and front end
   will have to go with same protocol in order to work.
 * Regards

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Not working over https’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-social-invitations_afb1c6.svg)
 * [Wordpress Social Invitations - Lite](https://wordpress.org/plugins/wp-social-invitations/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-social-invitations/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-social-invitations/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-social-invitations/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-social-invitations/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-social-invitations/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 9 replies
 * 2 participants
 * Last reply from: [Damian](https://wordpress.org/support/users/timersys/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/not-working-over-https/#post-4641430)
 * Status: resolved