Thread Starter
af3
(@af3)
#2 sudah oke… cache problem 🙂
Untuk #1, saya buat ini untuk deactivate checkout bila ongkir tidak dipilih kerna kode pos tidak dimasukkan.
function disable_checkout_button_no_shipping() {
$chosen_shipping_methods = WC()->session->get( 'chosen_shipping_methods' );
// remove button if there is no chosen shipping method
if( empty( $chosen_shipping_methods ) ) {
remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 );
}
}
add_action( 'woocommerce_proceed_to_checkout', 'disable_checkout_button_no_shipping', 1 );