Решил! Сделал скрытое поле возле кнопок
<div class="button-submit" style="text-align:right;">
<input type="text" name="custom_value" value="" hidden id="custom">
<button type="submit"
name="add-to-cart"
value="<?php echo esc_attr( $product->get_id() ); ?>"
onclick="jQuery('#custom').val(555)"
class="button alt single_add_to_cart_button">Заказать еще</button>
<button type="submit" name="add-to-cart"
value="<?php echo esc_attr( $product->get_id() ); ?>"
class="single_add_to_cart_button button alt">Оформить заказ</button>
</div>
и в functions.php добавил action
add_filter( 'woocommerce_add_to_cart_redirect', 'stamp_skip_cart' );
function stamp_skip_cart( $redirect ) {
$cart_items = WC()->cart->get_cart();
foreach ($cart_items as $cart_item ) {
if ($cart_item['tmpost_data']['custom_value'] == 555){
return get_home_url();
}
else{
return wc_get_checkout_url();
}
}
}