daymobrew

https to http - ugly hack

Feb 14th, 2016
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. // Change menu item links from https to http as checkout is https and it
  2. // puts menu links to https and they don't work.
  3. add_filter('wp_nav_menu', 'bdd_change_menu_https_to_http', 10, 2);
  4. function bdd_change_menu_https_to_http($nav_menu, $args) {
  5.     return str_replace('https', 'http', $nav_menu);
  6. }
Add Comment
Please, Sign In to add comment