mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-03 12:12:25 +08:00
https://github.com/strangerstudios/pmpro-snippets-library/blob/dev/frontend-pages/add-data-invoice-bullets.php
15 lines
366 B
Text
15 lines
366 B
Text
function my_pmpro_invoice_company_name() {
|
|
|
|
// Get user meta
|
|
global $current_user;
|
|
|
|
$company = get_user_meta( $current_user->ID, 'company', true );
|
|
|
|
// Add if meta is available
|
|
if ( ! empty( $company ) ) {
|
|
?>
|
|
<li><strong>Company:</strong> <?php echo $company; ?></li>
|
|
<?php
|
|
}
|
|
}
|
|
add_action( 'pmpro_invoice_bullets_top', 'my_pmpro_invoice_company_name' );
|