Skip to content
Docs
Get RestroPress

Filter

rpress_accepted_payment_icons

Updated
On this page

Filters the payment icons that can be chosen in the Accepted Payment Method Icons setting.

Runs while the gateways settings are registered. Keys are icon identifiers and values are labels. If a key is an image URL, that image is shown; otherwise the icon file is looked up in the images/icons template folder using the lowercased label, or supplied by a rpress_accepted_payment_{card}_image filter.

Parameters#

ParameterTypeDescription
$iconsarrayArray of icon key or image URL => label. Defaults: mastercard, visa, americanexpress, discover, paypal.

Return value#

array. The icon key => label array.

Example#

function my_payment_icons( $icons ) {
	$icons[ plugins_url( 'images/twint.png', __FILE__ ) ] = 'TWINT';
	return $icons;
}
add_filter( 'rpress_accepted_payment_icons', 'my_payment_icons', 10, 1 );

Source#

Applied in:

  • includes/admin/settings/register-settings.php (line 1103), in rpress_get_registered_settings()

See also#

Was this page helpful?