Skip to content

Instantly share code, notes, and snippets.

View gamaup's full-sized avatar

Gama Unggul Priambada gamaup

  • Inncomedia
  • Yogyakarta, ID
View GitHub Profile
@gamaup
gamaup / functions.php
Last active November 2, 2017 07:56
Reorder Checkout Fields
<?php
/* WooCommerce < 3.0.4 */
add_filter('woocommerce_checkout_fields','reorder_fields');
function reorder_fields($fields) {
$billing_field_order = array(
'billing_first_name',
'billing_last_name',
'billing_address_1',
'billing_email',
@gamaup
gamaup / VeritransController.php
Created August 23, 2016 04:29
a Tiga (WP plugin) controller to handle notifications sent by veritrans
<?php
class VeritransController {
public function index() {
global $woocommerce;
// get veritrans keys depending on environment (sandbox/production)
$vt = get_option('woocommerce_veritrans_settings');
if (empty($vt)) {
return Response::json(array("success"=>false,"error"=>"veritrans setting not found"),200,array());;
}