ture' => 'index-status' ] ] ) ); } /** * Get the plans for a given feature. * * @since 4.3.0 * * @param string $sectionSlug The section name. * @param string $feature The feature name. * @return array The plans for the feature. */ public function getPlansForFeature( $sectionSlug, $feature = '' ) { $plans = []; // Loop through all the features and find the plans that have access to the feature. foreach ( $this->getFeatures() as $featureArray ) { if ( $featureArray->section !== $sectionSlug ) { continue; } if ( ! empty( $feature ) && $featureArray->feature !== $feature ) { continue; } $plans[] = ucfirst( $featureArray->license_level ); } return array_unique( $plans ); } }