Commit 732dcbbed91 for woocommerce
commit 732dcbbed9176e03f9d1a231fe0bd893a8898e17
Author: Brian Coords <bacoords@gmail.com>
Date: Tue Jul 7 09:27:25 2026 -0700
Add payment settings gateway display docs (#66171)
* Add payment settings gateway display docs
* Update payment gateway display value docs
diff --git a/docs/features/payments/payment-gateway-api.md b/docs/features/payments/payment-gateway-api.md
index a5c9fa9cfa1..d40f3c25660 100644
--- a/docs/features/payments/payment-gateway-api.md
+++ b/docs/features/payments/payment-gateway-api.md
@@ -87,6 +87,36 @@ Finally, you need to add a save hook for your settings:
add_action( 'woocommerce_update_options_payment_gateways_' . $this->id, array( $this, 'process_admin_options' ) );
```
+##### Display in the Payments settings page
+
+The Payments settings page uses the gateway's admin-facing details to build the payment provider list. Set these values in your gateway constructor so merchants can identify your extension before they open its individual settings screen.
+
+| Provider detail | Source | Notes |
+| ----------------- | -------- | ------- |
+| Icon | `$this->icon` | Must be a valid image URL. Use a square image for the best fit. If the value is empty, invalid, or contains an `<img>` tag instead of a URL, WooCommerce shows the default payments icon. |
+| Title | `PaymentsProviders\PaymentGateway::get_title()` | Uses `WC_Payment_Gateway::get_method_title()` as a `$this->method_title` accessor. If it is empty, the provider falls back to the gateway's customer-facing `WC_Payment_Gateway::get_title()`, strips HTML, and truncates the display value to 75 characters. |
+| Description | `PaymentsProviders\PaymentGateway::get_description()` | Uses `WC_Payment_Gateway::get_method_description()` as a `$this->method_description` accessor. If it is empty, the provider falls back to the gateway's customer-facing `WC_Payment_Gateway::get_description()`, strips HTML, and truncates the display value to 130 characters. |
+
+Use `$this->method_title` and `$this->method_description` for concise admin copy. Use `$this->title` and `$this->description` for the customer-facing checkout label and payment instructions, often loaded from merchant settings with `$this->get_option()`.
+
+For example:
+
+```php
+public function __construct() {
+ $this->id = 'your_gateway';
+ $this->method_title = __( 'Your Gateway', 'your-text-domain' );
+ $this->method_description = __( 'Accept card payments with Your Gateway.', 'your-text-domain' );
+ $this->icon = plugins_url( 'assets/images/your-gateway-icon.svg', __FILE__ );
+ $this->has_fields = true;
+
+ $this->init_form_fields();
+ $this->init_settings();
+
+ $this->title = $this->get_option( 'title' );
+ $this->description = $this->get_option( 'description' );
+}
+```
+
#### init_form_fields()
Use this method to set `$this->form_fields` - these are options you'll show in admin on your gateway settings page and make use of the [WC Settings API](https://developer.woocommerce.com/docs/settings-api/).