Skip to content

Instantly share code, notes, and snippets.

View rvpatel's full-sized avatar

Ravikumar Patel rvpatel

View GitHub Profile
@rvpatel
rvpatel / custom-permalink-from-meta.php
Created November 23, 2017 12:52 — forked from petenelson/custom-permalink-from-meta.php
WordPress permalink for custom post type based on post meta
@rvpatel
rvpatel / functions.php
Created July 19, 2016 06:00 — forked from SiR-DanieL/functions.php
Adds VAT and SSN fields in WooCommerce workflow
// Add VAT and SSN fields in billing address display
add_filter( 'woocommerce_order_formatted_billing_address', 'custom_add_vat_ssn_formatted_billing_address', 10, 2 );
function custom_add_vat_ssn_formatted_billing_address( $fields, $order ) {
$fields['vat'] = $order->billing_vat;
$fields['ssn'] = $order->billing_ssn;
return $fields;
}
add_filter( 'woocommerce_my_account_my_address_formatted_address', 'custom_my_account_my_address_formatted_address', 10, 3 );