Automattic\WooCommerce\Internal\Admin\WCPayPromotion

Init::get_wc_pay_promotion_spec()public staticWC 1.0

Get WC Pay promotion spec.

Метод класса: Init{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = Init::get_wc_pay_promotion_spec();

Код Init::get_wc_pay_promotion_spec() WC 8.7.0

public static function get_wc_pay_promotion_spec() {
	$promotions            = self::get_promotions();
	$wc_pay_promotion_spec = array_values(
		array_filter(
			$promotions,
			function( $promotion ) {
				return isset( $promotion->plugins ) && in_array( 'woocommerce-payments', $promotion->plugins, true );
			}
		)
	);

	return current( $wc_pay_promotion_spec );
}