## Overview

Merchants using Shopify Plus can hide Affirm as a payment option when the customer's cart contains items with certain SKUs.

## Configuration

1\. Go to the [Shopify script editor](🔗) 2\. Click **Create Script** 3\. Choose **Payment Gateway** for the script type 4\. Choose **Blank Template** 5\. Click **Create Script** 6\. In the **Title box**, enter **Affirm Hide Based on SKU** as the script name 7\. Click **Code** to open the Ruby source code console 8\. Paste the following code into the console. Replace `SKU-1234` with your SKUs and add as many as you need (this is a comma separated list).



9\. Click **Run Script** 10\.. Click **Save and Publish**

## Tags

Add a [tag](🔗) to all the products that you want to hide Affirm as a payment method, Ex: hide-affirm. To hide Affirm as a payment option when the customer's cart contains items with certain product tags:

1\. Go to the [Shopify script editor](🔗) 2\. Click **Create Script** 3\. Choose **Payment Gateway** for the script type 4\. Choose **Blank Template** 5\. Click **Create Script** 6\. In the **Title box**, enter **Affirm Hide Based on SKU** as the script name 7\. Click Code to open the Ruby source code console 8\. Paste the following code into the console and replace `hide-affirm` with the tag you created for the products you want to hide Affirm. You can add as many as you need (this is a comma-separated list).



9\. Click **Run Script** 10\.. Click **Save and Publish**