shopp_orderui_payment_card

filters the markup displaying the payment card details in the Shopp Order Manager in the admin.

add_filter( 'shopp_orderui_payment_card', [callback] )

@param string $cardinfo markup displaying the payment card details in the Shopp Order Manager in the admin.
@param Purchase $Purchase the Purchase object for the currently displayed order.

Description

filters the markup displaying the payment card details in the Shopp Order Manager in the admin.

Example

// register filter callback
add_filter('shopp_orderui_payment_card', 'shopp_orderui_payment_card_fltr', 10, 2);

// create filter function
function shopp_orderui_payment_card_fltr( $cardinfo, $Purchase ) {
    // Example Default Contents
    // <p><strong>CHARGED</strong> to Visa (…1111)</p>

    // Shopp 1.2 usage only
    // now you can pass a Purchase object as the first param
    // and prefix your tag with get- as shorthand for 'return=true' option
    $cardtype = shopp($Purchase, 'get-cardtype');
    $cardnum = shopp($Purchase, 'get-card');
    $pay_state = shopp($Purchase, 'get-payment');

    $cardinfo = "<p><strong>$pay_state</strong> to $cardtype ($cardnum)</p>";

    return $cardinfo;
}

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar