Skip to content

Instantly share code, notes, and snippets.

@tribulant
Created May 7, 2015 20:03
Show Gist options
  • Save tribulant/ffb76641721662b8cce2 to your computer and use it in GitHub Desktop.
Save tribulant/ffb76641721662b8cce2 to your computer and use it in GitHub Desktop.
WordPress Shopping Cart: Redirect/Hosted Payment Gateway step 3
// WordPress Shopping Cart: Redirect/Hosted Payment Gateway step 3
// http://tribulant.com/docs/wordpress-shopping-cart-plugin/7190
function gateway_pmethods_list($active = null, $cssclass = null) {
?>
<tr class="<?php echo $cssclass = (empty($cssclass)) ? 'alternate' : ''; ?>">
<td><label><input <?php echo (!empty($active) && is_array($active) && in_array('gateway', $active)) ? 'checked="checked"' : ''; ?> type="checkbox" name="paymentmethods[]" value="gateway" /> <?php _e('Gateway', 'checkout-gateway'); ?></label></td>
</tr>
<?php
}
add_action('wpco_pmethods_list', 'gateway_pmethods_list', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment