Automattic\WooCommerce\Internal\Admin\WCPayPromotion
Init::get_wc_pay_promotion_spec()
Get WC Pay promotion spec.
Method of the class: Init{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = Init::get_wc_pay_promotion_spec();
Init::get_wc_pay_promotion_spec() Init::get wc pay promotion spec code WC 8.6.1
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 ); }