homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

Wordpress - How to break out of URL frame on secure checkout

Msg#: 4602222 posted 5:58 pm on Aug 15, 2013 (gmt 0)

Hi Folks,

Here's the task I'm looking to accomplish -

I have a wordpress site running woocommerce.

My site is a USA .com and I want to target Australia, so I've registered a .au version of my domain.

I've setup the .au version to point to my .com using a URL frame. So my australia visitors browse the site with the .au in the browser window, works great.

The problem is, when they make a purchase, it retains the .au when they move to the secured checkout, and HTTPS isn't shown in the browser.

So I need to bust them out of the URL frame when they hit the checkout button.

Obviously woocommerce has a checkout.php page but it calls the standard theme header, so I can't use Java in the header, as it would break them out as soon as they load the home page.

I'm thinking maybe there's a way to do it in .htaccess but I've no idea how.

Or maybe there's a line of php which can go in the checkout.php page?

Any ideas?





WebmasterWorld Administrator lorax us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4602222 posted 1:56 pm on Aug 28, 2013 (gmt 0)

Welcome to WebmasterWorld rooze,
If I understand you correctly, you want the URL to switch to the .com version when the user clicks checkout.

Technically this could be accomplished using htaccess but before doing this I would ask the question of how does woocommerce track the items in the cart? Will the user lose their cart contents when the switch is made?

Which also leads me to ask, why are you using .au? Why not just focus your marketing efforts on Australian resources and stick with the .com?

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved