Banners::get_banners()

Summary

Get banners


Return

(array)


Source

File: src/BigCommerce/Banners/Banners.php

	public function get_banners() {
		$cache = get_transient( self::CACHE );

		if ( ! empty( $cache ) && is_array( $cache ) ) {
			return $cache;
		}

		try {
			$banners = $this->banners_api->get_banners();
		} catch (\Throwable $th) {
			$banners = [];
		}

		set_transient( self::CACHE, $banners, self::CACHE_TTL );

		return $banners;
	}


User Contributed Notes

You must log in before being able to contribute a note or feedback.