Automattic\WooCommerce\Admin\Features\OnboardingTasks\Tasks
Purchase::get_paid_products_and_themes()
Get purchaseable and remaining products.
Method of the class: Purchase{}
No Hooks.
Return
Array
. purchaseable and remaining products and themes.
Usage
$result = Purchase::get_paid_products_and_themes();
Purchase::get_paid_products_and_themes() Purchase::get paid products and themes code WC 8.6.1
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; }