The users now gets redirected to the right page after they place an order on the site.
Thank you so much!

Code: Select all
if ( class_exists('WooCommerce') ) {
Code: Select all
// may restrict further more based on if some $_POST var exist or not
//if(isset($_POST['createaccount']) && $_POST['createaccount'] == 1 ){
Code: Select all
// FIX AUTOLOGIN for woocommerce or any other plugin, or even default wordpress:
// when user registered and need to be logged in automatically, then avoid to follow without phpBB session setup
// or since the phpBB cookie is not released at this point, when verify_credentials will fire, the user will be logged out
// add any other here, ex:
// if ( class_exists('WooCommerce') OR isset($_POST['createaccount']) OR class_exists('somethingelse') ) {
if ( class_exists('WooCommerce') ) {
// may restrict further more based on if some $_POST var exist or not
//if(isset($_POST['createaccount']) && $_POST['createaccount'] == 1 ){
if( ! defined("W3ALL_SESSION_ARELEASED") && ! defined("PHPBBAUTHCOOKIEREL") ){
$phpBB_user_session_set = self::phpBB_user_session_set_res($wpu);
define("W3ALL_SESSION_ARELEASED", true);
}
//}
}
return;