Skip to content

Commit

Permalink
Linter hates short ternaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeatorres committed Mar 21, 2024
1 parent a9af5a5 commit 46727c7
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -134,7 +134,8 @@ private function maybe_redirect_to_edit_order_page(): void {
$redirect_from_types = wc_get_order_types( 'admin-menu' );
$redirect_from_types[] = 'shop_order_placehold';

$order_type = get_post_type( $post_id ) ?: OrderUtil::get_order_type( $post_id );
$post_type = get_post_type( $post_id );
$order_type = $post_type ? $post_type : OrderUtil::get_order_type( $post_id );
if ( ! in_array( $order_type, $redirect_from_types, true ) || ! isset( $_GET['action'] ) ) {
return;
}
Expand Down

0 comments on commit 46727c7

Please sign in to comment.