Brand_Purge

Summary

No summary available.

Source

File: src/BigCommerce/Import/Processors/Brand_Purge.php

class Brand_Purge extends Term_Purge {
	protected function taxonomy() {
		return Brand::NAME;
	}

	protected function running_state() {
		return Status::PURGING_BRANDS;
	}

	protected function completed_state() {
		return Status::PURGED_BRANDS;
	}

	protected function get_remote_term_ids( array $ids ) {
		if ( empty( $ids ) ) {
			return [];
		}
		$response = $this->catalog_api->getBrands( [
			'id:in'          => $ids,
			'limit'          => count( $ids ),
			'include_fields' => 'id',
		] );

		return array_map( function ( $object ) {
			return $object['id'];
		}, $response->getData() );
	}
}

User Contributed Notes

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