includes/models/model.llms.product.php
Method get_access_plans
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function get_access_plans( $free_only = false, $visible_only = true ) {
$args = array(
'meta_key' => '_llms_product_id', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key
'meta_value' => $this->get( 'id' ), // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_value
Method has_active_subscriptions
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function has_active_subscriptions( $use_cache = true ) {
$found = false;
if ( $use_cache ) {
$subscriptions_count = wp_cache_get( $this->get( 'id' ), 'llms_product_subscriptions_count', true, $found );