Hide order again button
Hide "Order again" button if the user is not logged in.
This commit is contained in:
parent
f299763997
commit
be59e9f80b
|
@ -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;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue