This members-only tutorial provides the steps to output WooCommerce products belonging to one or more product categories (or product tags) that have been checked when viewing pages of a Custom Post Type. The product category selection metabox is via Advanced Custom Field's Taxonomy field.
product_categories Taxonomy-type custom field for project CPT:
When editing a Project CPT entry:
After implementing the tutorial viewing the above project singular page on the front end will show all the WooCommerce products that belong to the selected product category, Tshirts, in this case:
If more than 1 product category is selected by default, OR condition will be used i.e., all products that belong to any of the selected categories will appear. We can change this to use the AND operator i.e., products have to belong to all the selected categories.
When a parent product category is selected, products in its child categories will also appear.
If you have not already, register your Custom Post Type using a plugin like CPT UI.