Term_Strategy_Factory::get_strategy()
Summary
Identify the strategy for handling the term import based on the existing data in WP
Return
(BigCommerceImportImport_Strategy)
Source
File: src/BigCommerce/Import/Importers/Terms/Term_Strategy_Factory.php
public function get_strategy() { $matching_term_id = $this->get_matching_term(); if ( empty( $matching_term_id ) ) { return new Term_Creator( $this->bc_term, $this->taxonomy ); } if ( ! $this->needs_refresh( $matching_term_id ) ) { return new Term_Ignorer( $this->bc_term, $this->taxonomy, $matching_term_id ); } return new Term_Updater( $this->bc_term, $this->taxonomy, $matching_term_id ); }