Title: Problem with https and update.
Last modified: August 21, 2016

---

# Problem with https and update.

 *  Resolved [robertfarkle](https://wordpress.org/support/users/robertfarkle/)
 * (@robertfarkle)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/problem-with-https-and-update/)
 * It is great to see a new update, however this doesn’t work on my system because
   the frames / popups are blocked due to security issues related to http/https 
   mixing.
 * If I access the wp-admin with HTTPS, I get the following error:
    [blocked] The
   page at ‘[https://mywebsite.com/wp-admin/edit.php?post_type=shop_order&#8217](https://mywebsite.com/wp-admin/edit.php?post_type=shop_order&#8217);
   was loaded over HTTPS, but ran insecure content from ‘[http://mywebsite.com/my-account/print-order/1744/?print-order-type=invoice&#8217](http://mywebsite.com/my-account/print-order/1744/?print-order-type=invoice&#8217);:
   this content should also be loaded over HTTPS.
 * If I access the wp-admin with HTTP, I get the following error:
    Uncaught SecurityError:
   Blocked a frame with origin “[http://mywebsite.com&#8221](http://mywebsite.com&#8221);
   from accessing a frame with origin “[https://mywebsite.com&#8221](https://mywebsite.com&#8221);.
   The frame requesting access has a protocol of “http”, the frame being accessed
   has a protocol of “https”. Protocols must match.
 * This is because my theme enforces HTTPS for anything under /myaccount
 * It appears that get_permalink always returns “[http://&#8221](http://&#8221);?
   
   My current solution is to make the link relative and access wp-admin via https.
 * In the following function, I modified the $permalink to be relative instead of
   hard coding “http”
 *     ```
       public function get_print_page_url( $order_ids, $template_type = 'order', $order_email = null ) {
       ...
       // Generate the url
       $permalink = get_permalink( wc_get_page_id( 'myaccount' ) );
   
       // Make the permalink relative
       $permalink = str_replace( home_url(), "", $permalink );
       ...
       ```
   
 * Is there a better approach to solving this? I’d love to see some fix that doesn’t
   involve me hacking the code for future updates.
 * Thanks.
 * [https://wordpress.org/plugins/woocommerce-delivery-notes/](https://wordpress.org/plugins/woocommerce-delivery-notes/)

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

 *  Thread Starter [robertfarkle](https://wordpress.org/support/users/robertfarkle/)
 * (@robertfarkle)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/problem-with-https-and-update/#post-4780438)
 * This solution doesn’t work on the customer facing VIEW PRINT buttons under my-
   account. I’ll wait and see if someone smarter than I wants to chime in. Thanks!
 *  [gfors](https://wordpress.org/support/users/gfors/)
 * (@gfors)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/problem-with-https-and-update/#post-4780561)
 * Yup, I’m forcing SSL on wp-admin and /my-account/, and printing has broken completely
   due to using get_permalink which just uses the regular http:// and not https://
 * The above solution works great for me until there is a fix out.
 * /includes/class-wcdn-print.php on line #170 is the place to apply the fix
 *  [piffpaffpuff](https://wordpress.org/support/users/chabis/)
 * (@chabis)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/problem-with-https-and-update/#post-4780566)
 * [@robertfarkle](https://wordpress.org/support/users/robertfarkle/) thanks a lot
   for your help. i’m aware of the problem. there is another thread with users that
   have the same issue.
 * i try to work on the problem theses next days but i can’t test it, because i 
   do not have ssl.
 * do you have a github account and could help with the testing?

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

The topic ‘Problem with https and update.’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

## Tags

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

 * 3 replies
 * 3 participants
 * Last reply from: [piffpaffpuff](https://wordpress.org/support/users/chabis/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/problem-with-https-and-update/#post-4780566)
 * Status: resolved