Tak bisa pilih option JNE di checkout

Thread Starter


#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 );


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer