Home Forums WoodMart support forum REST API and Woodmart Variations As Single Products Setting Reply To: REST API and Woodmart Variations As Single Products Setting

#594020

Artem Temos
Keymaster

Hello,

Try to add the following PHP code snippet to the child theme functions.php file to fix this

add_filter(
	'woocommerce_rest_prepare_product_object',
	function ( $response, $object, $request ) {
		if ( 'variation' === $object->get_type() ) {
			return;
		}

		return $response;
	},
	10,
	3
);

Kind Regards