Checkout: Action – checkout_admin_paymentmethods_list


Use checkout_admin_paymentmethods_list action hook to add a checkbox to the list of payment methods checkboxes under Checkout > Configuration which is used to enable/disable certain payment methods accordingly.


add_action('checkout_admin_paymentmethods_list', 'paymentmethods_list', 10, 2);


  • $paymentmethods – An Array of current payment methods slugs.
  • $class – The current CSS class of the table row


function paymentmethods_list($paymentmethods = array(), $class = null) {
if (!in_array('mypmethod', $paymentmethods)) {

<tr class="<?php echo $class = (empty($class)) ? 'alternate' : ''; ?>">
<td><label><input <?php echo (!empty($paymentmethods) && is_array($paymentmethods) && in_array('mypmethod', $paymentmethods)) ? 'checked="checked"' : ''; ?> type="checkbox" name="paymentmethods[]" value="mypmethod" /> My Payment Method</label></td>


add_action('checkout_admin_paymentmethods_list', 'paymentmethods_list', 10, 2);

Earn Money by Referring People

Refer customers to us with your affiliate link and earn commission on sales from your link.

Get Started

Pin It on Pinterest

%d bloggers like this: