I have this function :

function nom_details( ){ 
if ( class_exists( 'WCVendors_Pro' ) ){ 
    $key = '_wcv_custom_settings_nom'; 
    $value = get_user_meta( get_current_user_id(), $key, true ); 
    // Dénomination sociale
    WCVendors_Pro_Form_Helper::input( array(  
        'id'                => $key, 
        'label'             => __( 'Dénomination sociale', 'wcvendors-pro' ), 
        'placeholder'           => __( 'Mon entreprise SARL', 'wcvendors-pro' ), 
        'desc_tip'          => 'true', 
        'description'           => __( 'Votre dénomination sociale', 'wcvendors-pro' ), 
        'type'              => 'text', 
        'value'             => $value, 
        )
    );
} 
}

And I’d like the value entered by the user to be displayed in this function

add_action( 'wpo_wcpdf_after_order_data', 'wpo_wcpdf_legal_name', 10, 2 );
function wpo_wcpdf_legal_name ($template_type, $order) {
global $wpo_wcpdf;
if ($template_type == 'packing-slip') {
    ?>
    <tr class="legal_name">
        <th>Dénomination sociale:</th>
        <td><?php $value->nom_details('nom_details'); ?></td>
    </tr>
    <?php
}
}

That way, the value entered by the user on wc vendors will be displayed on the invoice (woocommerce pdf invoice)

I’m not familiar with php (currently learning it) so I looked out different threads. I’m missing something but I can’t figure it out.

Any advice would be good.

Thank you for your patience and I do apologize for this dumb question.

Read more here: Display a value entered by user in a function into another one


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: