Product::get_source_data()

Summary

Get the product source data cached for this product


Return

(object)


Source

File: src/BigCommerce/Post_Types/Product/Product.php

	public function get_source_data() {
		if ( isset( $this->source_cache ) ) {
			return $this->source_cache;
		}

		$data = get_post_meta( $this->post_id, self::SOURCE_DATA_META_KEY, true );
		if ( empty( $data ) ) {
			return new \stdClass();
		}

		$this->source_cache = json_decode( $data );

		return $this->source_cache;
	}


User Contributed Notes

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