Forked from ipokkel/pmpro-invoice-bullets-example.php
Last active
September 29, 2025 10:46
-
-
Save dwanjuki/fd878ad25c95ee1b6f7a50e282216d03 to your computer and use it in GitHub Desktop.
Display Company Name as a bullet on the PMPro Invoice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Display Company Name as a bullet on the PMPro Invoice. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_custom_invoice_bullet_bottom( $invoice ) { | |
$user = get_userdata( $invoice->user_id ); | |
// Company Name | |
if ( ! empty( $user->company_name ) ) { | |
echo '<li><strong>Company: </strong>' . esc_html( $user->company_name ) . '</li>'; | |
} | |
} | |
add_action( 'pmpro_invoice_bullets_bottom', 'my_pmpro_custom_invoice_bullet_bottom' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment