Skip to content

Instantly share code, notes, and snippets.

@danieliser
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danieliser/776b495fe2c656bad366 to your computer and use it in GitHub Desktop.
Save danieliser/776b495fe2c656bad366 to your computer and use it in GitHub Desktop.
edd_checkout_cart_columns replacement
function edd_checkout_cart_columns() {
global $wp_filter;
$head_first = 0;
$head_last = 0;
if( isset( $wp_filter['edd_checkout_table_header_first'] ) ){
$head_first = count( $wp_filter['edd_checkout_table_header_first'] );
}
if( isset( $wp_filter['edd_checkout_table_header_last'] ) ){
$head_last = count( $wp_filter['edd_checkout_table_header_last'] );
}
$default = 3;
return apply_filters( 'edd_checkout_cart_columns', $head_first + $head_last + $default );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment