return $BillingSupport->saveContactBillingData( $ref_dest );
}, 10, 1
);
+
+/**
+ * Filter for the billing fields
+ */
+add_filter(
+ 'glm-member-db-billing-get-fields',
+ function( $content ){
+ return array(
+ 'renewal_date' => 'Renewal Date',
+ 'billing_fname' => 'Billing First Name',
+ 'billing_lname' => 'Billing Last Name',
+ 'billing_addr1' => 'Billing Address 1',
+ 'billing_addr2' => 'Billing Address 2',
+ 'billing_city' => 'Billing City',
+ 'billing_state' => 'Billing State',
+ 'billing_zip' => 'Billing Zip',
+ 'billing_country' => 'Billing Country',
+ 'billing_phone' => 'Billing Phone',
+ 'billing_fax' => 'Billing Fax',
+ );
+ }, 10, 1
+);
+
+/**
+ * Filter for getting billing field for a member
+ */
+add_filter(
+ 'glm-member-db-billing-get-data',
+ function( $ref_dest ){
+ // Get billing info for $ref_dest.
+ require_once GLM_MEMBERS_BILLING_PLUGIN_CLASS_PATH . '/billingSupport.php';
+ $BillingSupport = new GlmBillingSupport( $this->wpdb, $this->config );
+ return $BillingSupport->getAccountByRefDest( $ref_dest );
+ }, 10, 1
+);