Endpoint after Buddypress registration on wordpress

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

If you wish to attach one or more files enter the details below.

Maximum filesize per attachment: 1 MiB.

Expand view Topic review: Endpoint after Buddypress registration on wordpress

Re: Endpoint after Buddypress registration on wordpress

by deltavlokkies » Tue Jun 29, 2021 10:48 pm

I updated the plugin today, and the bug is back.
When a users places an order it's not redirected to the right page.
Also, if they create a new account its get redirected home.
Is there a fix for this?


EDIT : The old fix doesn't seem to work anymore.

EDIT 2 : I'm running the latest wordpress and woocommerce versions.

Re: Endpoint after Buddypress registration on wordpress

by axew3 » Sun Jan 31, 2021 2:55 pm

the next plugin version, change the code of the
private static function create_phpBB_user(){
function, adding +- the follow right on bottom

note that if the code is not wrapped into

Code: Select all

 if ( class_exists('WooCommerce') ) {
or something else as explained, like

Code: Select all

// may restrict further more based on if some $_POST var exist or not 
  //if(isset($_POST['createaccount']) && $_POST['createaccount'] == 1 ){
then this will cause an autologin for users when they register, for any situation, even into default wordpress!

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;

Re: Endpoint after Buddypress registration on wordpress

by axew3 » Sun Jan 31, 2021 7:57 am

Ok, i do not know if your configuration provide or not the autologin for users when they place an order together with an account.
I have the install test with many other plugins together with woocommerce, and actually i see my user auto logged when he request a new account to be created with the order. DO not know at moment if it is due to woocommerce or any others profile plugins.

The code above about this, will be improved further more to check ever for correct hooks, and embedded into next plugin vers

Re: Endpoint after Buddypress registration on wordpress

by deltavlokkies » Sun Jan 31, 2021 7:51 am

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

Re: Endpoint after Buddypress registration on wordpress

by axew3 » Sun Jan 31, 2021 7:39 am

mh strange:
into my tests all works fine.
May the $_POST vars are not filled into your configuration?

can you so try to change the code into this:

Code: Select all

    if( ! defined("W3ALL_SESSION_ARELEASED") && ! defined("PHPBBAUTHCOOKIEREL") ){ 
     $phpBB_user_session_set = self::phpBB_user_session_set($wpu);
     define("W3ALL_SESSION_ARELEASED", true);
    }
the file is this:
class.wp.w3all-phpbb.zip
(32.71 KiB) Downloaded 285 times
and check if now works into your now?
woocheckoutconfirm.jpg
woocheckoutconfirm.jpg (239.75 KiB) Viewed 3498 times

Re: Endpoint after Buddypress registration on wordpress

by deltavlokkies » Sun Jan 31, 2021 7:31 am

Alright, thank you for the help so far.
I replaced the file like you said, but so far no dice. After the users places a order on the site, it still redirects them to the home page..

Top