Instantly share code, notes, and snippets.

What would you like to do?
Filter Kurir Rajaongkir pada Plugin Ongkos Kirim
add_filter('pok_rates', 'filter_rajaongkir_courier', 10, 2);
function filter_rajaongkir_courier($rates, $package) {
$filtered_rates = array();
$selected_courier = array(
'JNE - REG',
'JNE - OKE',
foreach ($rates as $r) {
if (in_array($r['class'], $selected_courier)) {
$filtered_rates[] = $r;
return $filtered_rates;

This comment has been minimized.

Copy link

gamaup commented Apr 28, 2017

Sesuaikan $selected_courier dengan nama layanan yang dikehendaki. Pilihan nama-nama layanan bisa dilihat dengan cara mencoba melakukan checkout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment