Home / Admin / WP Simple Pay: Change Custom Amount Field Input Type
Duplicate Snippet

Embed Snippet on Your Site

WP Simple Pay: Change Custom Amount Field Input Type

Changes the `type` attribute on the `input` tag. This helps some mobile keyboards have a better input scheme, including the '.' decimal.

Code Preview
php
<?php
/**
 * @link https://library.wpcode.com/snippet/rodjlwom/
 */
add_filter(
	'simpay_custom_amount_field_type',
	/**
	 * @param string $input_type
	 * @return string
	 */
	function ( $input_type ) {
		return 'number';
	}
);

Comments

Add a Comment