Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Up-sells sorting
add_filter( 'woocommerce_upsells_orderby', function() { return 'date'; } );
add_filter( 'woocommerce_upsells_order', function() { return 'desc'; } );
// Cross-sells sorting
add_filter( 'woocommerce_cross_sells_orderby', function() { return 'date'; } );
add_filter( 'woocommerce_cross_sells_order', function() { return 'desc'; } );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.