Showing 3,141 of 4,341 total issues
Method get_item_schema
has 194 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_item_schema() {
$schema = array(
'$schema' => 'http://json-schema.org/draft-04/schema#',
'title' => $this->post_type,
'type' => 'object',
Method get_settings
has 193 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_settings() {
$erasure_text = esc_html__( 'account erasure request', 'woocommerce' );
$privacy_text = esc_html__( 'privacy page', 'woocommerce' );
if ( current_user_can( 'manage_privacy_options' ) ) {
if ( version_compare( get_bloginfo( 'version' ), '5.3', '<' ) ) {
Function apply
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Defaults.prototype.apply = function (options) {
options = $.extend(true, {}, this.defaults, options);
if (options.dataAdapter == null) {
if (options.ajax != null) {
Function apply
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Defaults.prototype.apply = function (options) {
options = $.extend(true, {}, this.defaults, options);
if (options.dataAdapter == null) {
if (options.ajax != null) {
Function apply
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Defaults.prototype.apply = function (options) {
options = $.extend(true, {}, this.defaults, options);
if (options.dataAdapter == null) {
if (options.ajax != null) {
Function apply
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Defaults.prototype.apply = function (options) {
options = $.extend(true, {}, this.defaults, options);
if (options.dataAdapter == null) {
if (options.ajax != null) {
Function exports
has 190 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function( grunt ) {
'use strict';
var sass = require( 'node-sass' );
grunt.initConfig({
Method register_post_types
has 190 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function register_post_types() {
if ( ! is_blog_installed() || post_type_exists( 'product' ) ) {
return;
}
Method get_main_chart
has 189 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_main_chart() {
global $wp_locale;
if ( empty( $this->product_ids ) ) {
?>
Function drawSeriesLines
has 187 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function drawSeriesLines(series) {
function plotLine(datapoints, xoffset, yoffset, axisx, axisy) {
var points = datapoints.points,
ps = datapoints.pointsize,
prevx = null, prevy = null;
File class-wc-api-customers.php
has 477 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* WooCommerce API Customers Class
*
* Handles requests to the /customers endpoint
File class-woocommerce.php
has 473 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* WooCommerce setup
*
* @package WooCommerce
File class-wc-rest-webhooks-v1-controller.php
has 472 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* REST API Webhooks controller
*
* Handles requests to the /webhooks endpoint.
File class-wc-rest-legacy-products-controller.php
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* REST API Legacy Products controller
*
* Handles requests to the /products endpoint.
File class-wc-report-coupon-usage.php
has 468 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Coupon usage report functionality
*
* @package WooCommerce\Admin\Reports
File class-wc-api-customers.php
has 468 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* WooCommerce API Customers Class
*
* Handles requests to the /customers endpoint
Method get_main_chart
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_main_chart() {
$query_data = array(
'_order_tax' => array(
'type' => 'meta',
'function' => 'SUM',
File class-wc-frontend-scripts.php
has 466 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
/**
* Handle frontend scripts
*
* @package WooCommerce\Classes
Method widget
has 179 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function widget( $args, $instance ) {
global $wp_query, $post;
$count = isset( $instance['count'] ) ? $instance['count'] : $this->settings['count']['std'];
$hierarchical = isset( $instance['hierarchical'] ) ? $instance['hierarchical'] : $this->settings['hierarchical']['std'];
Method prepare_item_for_response
has 178 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function prepare_item_for_response( $post, $request ) {
$order = wc_get_order( $post );
$dp = is_null( $request['dp'] ) ? wc_get_price_decimals() : absint( $request['dp'] );
$data = array(