Yes.I am trying to fetch text field1 in my invoice.Here is my code:
/**
* Filter Text field1
*
* @since 1.1
*
* @global type $wpo_wcpdf
*
* @param type $billing_city
*
* @return string $billing_city
*/
function wpo_wcpdf_add_dokan_billing_city( $billing_city ) {
global $wpo_wcpdf;
// If parent order keep Original Store name else set seller store name
if ( $wpo_wcpdf->export->order->post->post_parent == 0 ) {
if ( function_exists( 'dokan_get_seller_ids_by' ) ) {
$seller_list = dokan_get_seller_ids_by( $wpo_wcpdf->export->order->id );
} else {
$seller_list = array_unique( array_keys( dokan_get_sellers_by( $wpo_wcpdf->export->order->id ) ) );
}
if ( count( $seller_list ) > 1 ) {
return $billing_city;
} else {
$seller_id = $seller_list[0];
$store_info = dokan_get_store_info( $seller_id );
$billing_city = !empty( $store_info['billing_city'] ) ? $store_info['billing_city'] : __( 'store_info', 'dokan-invoice' );
return $billing_city . '<br /><br />Company Name: ' . $billing_city;
}
} else {
$seller_id = $wpo_wcpdf->export->order->post->post_author;
$store_info = dokan_get_store_info( $seller_id );
$billing_city = !empty( $store_info['billing_city'] ) ? $store_info['billing_city'] : __( 'store_info', 'dokan-invoice' );
return $billing_city . '<br /><br />Text field1: ' . $billing_city;
}
}
I have also added action in dokan-invoice.php
add_filter( 'wpo_wcpdf_billing_city', array( $this,'wpo_wcpdf_add_dokan_billing_city'), 10, 1 );
But,I am unable to get the Text field1 value which is saved in store settings page.I can easily view the field data from seller panel.But,it is not coming in my invoice.
Kindly help!!