Skip to content

Instantly share code, notes, and snippets.

@ali-cedcoss
Last active April 15, 2022 05:39
Show Gist options
  • Save ali-cedcoss/02af45f8e06aa45b7f56c2bb59967f06 to your computer and use it in GitHub Desktop.
Save ali-cedcoss/02af45f8e06aa45b7f56c2bb59967f06 to your computer and use it in GitHub Desktop.
ebay site category exclusion for imported products

###Code goes in the ced_ebay_bulk_import_to_store functin

/* Exclusion on the basis of predefined eBay Site Category */
if(!empty($itemDetails['Item']['PrimaryCategory']['CategoryID'])){
						$cedCatInstance = CedGetCategories::get_instance( $siteID, $token );
						$getCat = $cedCatInstance->_getCategoryTree( '12576' );
						$search = $itemDetails['Item']['PrimaryCategory']['CategoryID'];
							$found = array_filter($getCat['CategoryArray']['Category'],function($v,$k) use ($search){
			  return $v['CategoryID'] == $search;
			}, ARRAY_FILTER_USE_BOTH);
						if(is_array($found) && !empty($found)){
							continue;
						}
					}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment