Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
Purchase::get_paid_products_and_themes()
Get purchaseable and remaining products.
Метод класса: Purchase{}
Хуков нет.
Возвращает
Массив
. purchaseable and remaining products and themes.
Использование
$result = Purchase::get_paid_products_and_themes();
Код Purchase::get_paid_products_and_themes() Purchase::get paid products and themes WC 8.7.0
public static function get_paid_products_and_themes() { $relevant_products = OnboardingProducts::get_relevant_products(); $profiler_data = get_option( OnboardingProfile::DATA_OPTION, array() ); $theme = isset( $profiler_data['theme'] ) ? $profiler_data['theme'] : null; $paid_theme = $theme ? OnboardingThemes::get_paid_theme_by_slug( $theme ) : null; if ( $paid_theme ) { $relevant_products['purchaseable'][] = $paid_theme; if ( isset( $paid_theme['is_installed'] ) && false === $paid_theme['is_installed'] ) { $relevant_products['remaining'][] = $paid_theme['title']; } } return $relevant_products; }