Documentation

Add_filter | Disable payment options (Product IDs)

Note

Please note that this guide is intended for developers and designers with some knowledge of PHP.

It’s important to understand that we do not offer customisation services as part of our support policy, but we provide sample code as a reference.

This guide explains how to exclude specific payment product IDs from your payment options using the ag_exclude_product_ids filter.

Overview

By default, all available payment methods are presented to your customers during checkout. However, you may wish to exclude certain payment methods based on your business needs. The ag_exclude_product_ids filter allows you to customise which payment product IDs are excluded from the available payment options.

How to Exclude Payment Methods

Add the following code to your theme’s functions.php file or a custom plugin:

Steps:

  1. Locate the File: Open your theme’s functions.php file or create a custom plugin.
  2. Insert the Code: Copy and paste the code snippet above.
  3. Customize IDs: Replace 5408 and 5678 with the payment product IDs you wish to exclude. Refer to the Worldline documentation for a list of IDs.
  4. Save Changes: Save the file.
  5. Test: Check your checkout page to ensure the specified payment methods are excluded.

Notes

  • Backup First: Always back up your site before making code changes.
  • Clearing Cache: If changes don’t appear, clear your site’s cache.

Was this helpful?

Worldline Hosted Checkout

Don't already have the plugin? Get access now.

Still need help?

Our team are on hand to provide fast, helpful and professional support.

Support request
Some systems down

Back End Demo

Start exploring our fully functional demo site today.
Gain exclusive admin access to see what's possible.

Create your demo now

Front End Demo

Test drive our plugin on the demo site.

View Demo