WC_Admin_Marketplace_Promotions::update_promotions
Fetch promotions from the API and store them in a transient.
Method of the class: WC_Admin_Marketplace_Promotions{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = WC_Admin_Marketplace_Promotions::update_promotions();
WC_Admin_Marketplace_Promotions::update_promotions() WC Admin Marketplace Promotions::update promotions code WC 10.3.3
public static function update_promotions() {
// Fetch promotions from the API.
$promotions = self::fetch_marketplace_promotions();
set_transient( self::TRANSIENT_NAME, $promotions, self::TRANSIENT_LIFE_SPAN );
}