WooCommerce + Afterpay - anyone know how to exclude a category?

Hi there, Does anyone know how I can exclude a product category from Afterpay - I am using woocommerce and wordpress.

I found this code, but do not know how to apply this a a product category as opposed to individual products?

/**

  • @param bool $bool_result
  • @param WC_Product $product
    */
    function afterpay_ips_callback( $bool_result, $product ) {

    My custom products don’t support Afterpay.

    if ($product->get_type() == ‘my-custom-product-type’) {
    $bool_result = false;
    }
    return $bool_result;
    }
    add_filter( ‘afterpay_is_product_supported’, ‘afterpay_ips_callback’, 10, 2 );

Just paste the code into functions.php If it doesn’t work, means that you’d need theme modifications. In that case, I can offer paid support, if you’re interested in

I was wondering if that code is able to be used to exclude an entire category, you can see it is for specific products.

with a custom work, yes

Thanks, I will keep asking around the forums, hopefully someone can help me with some advice.