Skip to content
Docs
Get RestroPress

Action

rpress_{$payment_mode}_cc_form

Updated
On this page

Fires to render the card form of the selected payment gateway.

Runs in rpress_show_cc_form() when the cart total is greater than zero and a callback exists for the chosen gateway. The dynamic part is the gateway ID returned by rpress_get_chosen_gateway(). If nothing is hooked for that gateway, the generic rpress_cc_form action runs instead.

Example#

function my_gateway_cc_form() {
	echo '<div id="my-gateway-fields"></div>';
}
add_action( 'rpress_mygateway_cc_form', 'my_gateway_cc_form', 10, 0 );

Notes#

Gateway add-ons register a callback on this action for their own gateway ID to replace the default card form.

Source#

Fired from:

  • includes/checkout/template.php (line 243), in rpress_show_cc_form()

See also#

Was this page helpful?