Adakah Fitur Gratis Ongkir Jika Belanja Nominal tertentu?
Updated on April 21, 2021 in Plugin Ongkos Kirim
Premium  2 on April 20, 2021

Halo admin, apakah ada fitur utk memberikan free ongkir utk orang yg belanja di nominal tertentu?

  • Liked by
By using the forum you are agree with tonjoo studio license agreement
Moderator 0 on April 20, 2021

Halo,

Bisa menggunakan Coupon Woocommerce (Discount Type dipilih Shipping Discount by Plugin Ongkos Kirim)

Salam,
Tonjoostudio Support.

  • Liked by
Cancel
By using the forum you are agree with tonjoo studio license agreement
Message :
Moderator 0 on April 21, 2021

Selain menggunakan Coupon, bisa juga dengan menggunakan hook (filter), berikut contoh kodenya:

function custom_filter_rate( $rate ) {

// TODO
// silahkan gunakan logic untuk memfilter $rate disini

if( WC()->cart->total > 100000 ) { // jika total cart > 100rb.
$rate[‘meta_data’][‘original_cost’] = $rate[‘cost’]; // simpan original costnya sebagai metadata
$rate[‘cost’] = 0; // ubah cost jadi 0
}
return $rate;
}
add_filter( ‘pok_rate’, ‘custom_filter_rate’, 10 );

Salam,
Tonjoostudio Support.

  • Liked by
Cancel
By using the forum you are agree with tonjoo studio license agreement
Message :
Loading more replies
You are not logged in

Please login here or simply sign up here .