wp-e-commerce / WP-e-Commerce

WP eCommerce - The most popular independent eCommerce platform for WordPress
https://wpecommerce.org
GNU General Public License v2.0
215 stars 216 forks source link

Adding customer account tabs #2307

Closed mihaijoldis closed 7 years ago

mihaijoldis commented 7 years ago

Adding for example 2 customer account tabs via code is broken. Only the lat one added (i guess) will work. The menu is showing but when clicking the first added tab shows a not found page. Last one added works fine.

You can test by having 2 copies ( code changes required ) of https://github.com/wp-e-commerce/sample-tev2-plugin active at the same time

mihaijoldis commented 7 years ago

Tried to do some debugging with 3 tabs open in chrome. Default orders page, and 2 extra added tabs.

Inside router.php / init_controller method after $this->controller = _wpsc_load_controller( $controller ) i added a var dump to see the controller returned and its always the last added "user tab" On each of the 3 tabs i see the same var_dump. I thought it should be different depending on the tab you are loading ?

mihaijoldis commented 7 years ago

Another thing i noticed is that $controller is always being passed as customer-account