Product_Strategy_Factory::get_strategy()

Summary

No summary available.

Return

(BigCommerceImportImport_Strategy)


Source

File: src/BigCommerce/Import/Importers/Products/Product_Strategy_Factory.php

	public function get_strategy() {
		$matching_post_id = $this->get_matching_post();
		if ( empty( $matching_post_id ) ) {
			return new Product_Creator( $this->product, $this->listing, $this->channel_term, $this->catalog );
		}

		if ( ! $this->needs_refresh( $matching_post_id ) ) {
			return new Product_Ignorer( $this->product, $this->listing, $this->channel_term, $this->catalog, $matching_post_id );
		}

		return new Product_Updater ( $this->product, $this->listing, $this->channel_term, $this->catalog, $matching_post_id );

	}


User Contributed Notes

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