Skip to content

Instantly share code, notes, and snippets.

@gamaup gamaup/functions.php
Last active Jan 7, 2019

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
Owner Author

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
You can’t perform that action at this time.