Forum Replies Created

Viewing 6 replies - 16 through 21 (of 21 total)
  • Forum: Plugins
    In reply to: WooCommerce Login Redirect

    Hi,

    not sure about 2, but I can help on issue 1.

    I believe the fix they suggest only works if you are using the login widget on your site. If it’s the login form directly you need to do something different.

    This how I did manage to redirect the user after woocommerce logged in.

    You just need to add an <input type=”hidden” name=”redirect” value=”<?php echo get_home_url(); ?>” /> to your login form and set the value attribute with the url you want to redirect to.

    Please make sure you are not editing the form-login.php file directly on woocommerce, if you need you can add a copy of this file on your theme directory (my-theme/woocommerce/myaccount/form-login.php) and do whatever you need to do here.

    Hope this is helpful.

    Hi,

    I needed to do exactly this. This how I did manage to redirect the user after woocommerce logged in.

    You just need to add an <input type="hidden" name="redirect" value="<?php echo get_home_url(); ?>" /> to your login form and set the value attribute with the url you want to redirect to.

    Please make sure you are not editing the form-login.php file directly on woocommerce, if you need you can add a copy of this file on your theme directory (my-theme/woocommerce/myaccount/form-login.php) and do whatever you need to do here.

    Hope this is helpful.

    Plugin Author Ana Aires

    (@aaires)

    Hi trivum,

    thanks for spotting it.
    We did a small fix on the css and ended up messing with the activate button. It should be ok now. Please give it a second try ??

    Cheers,

    Ana Aires

    Plugin Author Ana Aires

    (@aaires)

    Thanks ?? I’m glad you like it and find it useful.

    Hi guys, we were having the same problem, that’s how we fixed it:

    Please go to plugin.php file function setup() on line 111.
    Basically this is the setup function of the object ConfSched_Plugin which will hold info like directory name and url.
    On windows setup is failing due to the comparisson paths:

    stripos( __FILE__, WP_PLUGIN_DIR )

    on windows _FILE_ is built like this: root\dir\to\path and instead WP_PLUGIN_DIR is build like this: root/dir/to/path so comparison fails and plugin is not setup up properly.

    What we did was to fix pahts replacing ‘\’ by ‘/’ before comparing, and then using those 2 new variables instead of __FILE__ and WP_PLUGIN_DIR.

    public function setup( $name = '' ) {
      //remove backslashes for windows machines
      $file = str_replace("\\","/",__FILE__);
      $plugindir = str_replace("\\","/",WP_PLUGIN_DIR);
    
       if ( ! $name )
          throw new exception( "Please pass the name parameter into the setup method." );
           $this->name = $name;
           // Setup the dir and url for this plugin/theme
    	if ( stripos( $file, 'themes' ) ) {
              ...
    	}
            elseif ( stripos( $file, $plugindir ) !== false ) {...

    Hope you find this helpful.
    Cheers.

    Hi,

    I have exactly the same issue. Any new thoughts?

    Thanks

Viewing 6 replies - 16 through 21 (of 21 total)