S pluginem – Jak nastavit ve WordPressu u Woocommerce minimální množství objednávky:
Použijte např. Code Snippets https://wordpress.org/plugins/code-snippets/
Vytvořte nový snippet a vložte tam kód níže a upravíte částku dle sebe zde: $min_total = 500;
add_action( ‚woocommerce_check_cart_items‘, ‚required_min_cart_subtotal_amount‘ );
function required_min_cart_subtotal_amount() {
// Only run in the Cart or Checkout pages
if( is_cart() || is_checkout() ) {
// HERE Set minimum cart total amount
$min_total = 500;
// Total (before taxes and shipping charges)
$total = WC()->cart->subtotal;
// Add an error notice is cart total is less than the minimum required
if( $total <= $min_total ) {
// Display an error message
wc_add_notice( ‚<strong>‘ . sprintf( __(„Minimální výše objednávky je %s.“), wc_price($min_total) ) . ‚<strong>‘, ‚error‘ );
}
}
}

Bez pluginu – Jak nastavit na webu minimální výši objednávky
do souboru functions.php vložíte kód a upravíte částku dle sebe zde: $min_total = 500;
add_action( ‚woocommerce_check_cart_items‘, ‚required_min_cart_subtotal_amount‘ );
function required_min_cart_subtotal_amount() {
// Only run in the Cart or Checkout pages
if( is_cart() || is_checkout() ) {
// HERE Set minimum cart total amount
$min_total = 500;
// Total (before taxes and shipping charges)
$total = WC()->cart->subtotal;
// Add an error notice is cart total is less than the minimum required
if( $total <= $min_total ) {
// Display an error message
wc_add_notice( ‚<strong>‘ . sprintf( __(„Minimální výše objednávky je %s.“), wc_price($min_total) ) . ‚<strong>‘, ‚error‘ );
}
}
}