Checkout: Action – checkout_admin_pmethods_metaboxes

Description

The checkout_admin_pmethods_metaboxes action hook lets you do something when the metaboxes are registered for the Checkout > Configuration > Payment Methods section.

You can use this to add your own metabox with settings for your own payment method for example.

Usage

Use the action hook like this:

add_action('checkout_admin_pmethods_metaboxes', 'pmethods_metaboxes', 10, 1);

Arguments

  • $page – The current dashboard page slug for the metaboxes

Example

function pmethods_metaboxes($page = null) {
add_meta_box('mypmethod', "My Payment Method", "settings", $page, 'normal', 'core');
}

function settings() {
//output HTML here for settings as needed
}

add_action('checkout_admin_pmethods_metaboxes', 'pmethods_metaboxes', 10, 1);

WordPress Plugins

Start selling products, sending newsletters, publishing ads, and more through your own WordPress website using our premium WordPress plugins.

Browse

Pin It on Pinterest

%d bloggers like this: