ID ); $current = isset( $_GET['log_page'] ) ? absint( $_GET['log_page'] ) : 1; $args = array( 'post_id' => $webhook->id, 'status' => 'approve', 'type' => 'webhook_delivery', 'number' => self::$quantity ); if ( 1 < $current ) { $args['offset'] = ( $current - 1 ) * self::$quantity; } remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_webhook_comments' ), 10, 1 ); $logs = get_comments( $args ); add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_webhook_comments' ), 10, 1 ); if ( $logs ) { include_once( 'views/html-webhook-logs.php' ); } else { echo '
' . __( 'This Webhook has no log yet.', 'woocommerce' ) . '
'; } } /** * Get the logs navigation. * * @param int $total * * @return string */ public static function get_navigation( $total ) { global $post; $pages = ceil( $total / self::$quantity ); $current = isset( $_GET['log_page'] ) ? absint( $_GET['log_page'] ) : 1; $html = ' '; return $html; } }