Hide order again button

Hide "Order again" button if the user is not logged in.
This commit is contained in:
Nicola Mustone 2014-11-12 11:44:26 +01:00
parent f299763997
commit be59e9f80b
1 changed files with 1 additions and 1 deletions

View File

@ -1592,7 +1592,7 @@ if ( ! function_exists( 'woocommerce_order_again_button' ) ) {
* @return void * @return void
*/ */
function woocommerce_order_again_button( $order ) { function woocommerce_order_again_button( $order ) {
if ( ! $order || ! $order->has_status( 'completed' ) ) { if ( ! $order || ! $order->has_status( 'completed' ) || ! is_user_logged_in() ) {
return; return;
} }
?> ?>