Sorry! Internet Explorer is not supported on this site. Please view on Chrome, Firefox, or Edge.

Having fun at Zao is one of our values. We’ve put limited animated flourishes throughout our site to communicate our love of levity. We also recognize that onscreen movement is not fun or possible for everyone. We've turned off all our animations for you per your browser's request to limit motion. That said, we don't want you to miss out on the party.

Here's a funny joke to enjoy!

Where does the General keep his armies?

In his sleevies!

WP eCommerce: How to Enable the Test Gateway for Admins Only

From time to time, I find myself needing to do test purchasing on a live site. Generally speaking, it’s because there is something occurring outside the payment flow on a live site that cannot be replicated locally. The following code ensures that the test gateway is enabled only for logged-in admin users. Hope it’s helpful!

add_filter( 'option_custom_gateway_options', function( $gateways ) {

    if ( current_user_can( 'manage_options' ) && ! in_array( 'wpsc_merchant_testmode', $gateways ) ) {
        $gateways[] = 'wpsc_merchant_testmode';
    }

    return $gateways;
} );

Join the Conversation

1 Comment

Leave a comment

Your email address will not be published. Required fields are marked *