diff --git a/inc/custom-post-types/abstract.php b/inc/custom-post-types/abstract.php index 31ee235f2..4a7f350f8 100644 --- a/inc/custom-post-types/abstract.php +++ b/inc/custom-post-types/abstract.php @@ -654,7 +654,7 @@ public function _check_post(): bool { * * @return bool * @since 4.1.6.9 - * @version 1.0.0 + * @version 1.0.1 */ public function check_post( int $post_id = 0 ): bool { $can_save = true; @@ -662,11 +662,13 @@ public function check_post( int $post_id = 0 ): bool { try { $post = get_post( $post_id ); if ( ! $post ) { - throw new Exception( 'Post is invalid' ); + //throw new Exception( 'Post is invalid' ); + return false; } if ( $this->_post_type !== $post->post_type ) { - throw new Exception( 'Post type is invalid' ); + //throw new Exception( 'Post type is invalid' ); + return false; } if ( ! current_user_can( ADMIN_ROLE ) && diff --git a/inc/custom-post-types/order.php b/inc/custom-post-types/order.php index f1f064926..e83da1212 100644 --- a/inc/custom-post-types/order.php +++ b/inc/custom-post-types/order.php @@ -369,8 +369,9 @@ public function update_status() { * * @return mixed * @since 2.1.7 + * @deprecated 4.2.6.4 */ - public function row_actions( $actions, $post ) { + /*public function row_actions( $actions, $post ) { if ( ! empty( $actions['inline hide-if-no-js'] ) ) { unset( $actions['inline hide-if-no-js'] ); } @@ -378,25 +379,8 @@ public function row_actions( $actions, $post ) { $actions['edit'] = preg_replace( '/>(.*?)<\/a>/', '>' . __( 'View Order', 'learnpress' ) . '', $actions['edit'] ); } - $order = learn_press_get_order( $post->ID ); - if ( $order->is_multi_users() ) { - $actions['child-orders'] = sprintf( - '%s', - esc_url_raw( - add_query_arg( - array( - 'post_type' => LP_ORDER_CPT, - 'parent' => $post->ID, - ), - admin_url( 'edit.php' ) - ) - ), - __( 'View child orders', 'learnpress' ) - ); - } - return $actions; - } + }*/ /** * re-order the orders by newest