Type: php
MemberPress: Display Custom Field Value Instead of Customer Name in PDF invoice
function mepr_change_invoice_bill_to( $invoice, $txn ) { $user = $txn->user(); // Get company custom field. // Replace ‘mepr_company_name’ with the custom field slug. $company = get_user_meta( $user->ID, ‘mepr_company_name’, true ); // Return company name if not empty $name = ( !empty(…Continue reading
Port source
echo “Adresse et port”; echo ““; echo $_SERVER[‘REMOTE_ADDR’]; echo ““; echo $_SERVER[‘REMOTE_PORT’];Continue reading
Disable URL Autocorrect Guessing
add_filter( ‘do_redirect_guess_404_permalink’, ‘__return_false’ );Continue reading
MemberPress: Extend Grace Period for Renewals
function mepr_extend_renewal_grace_days( $days ) { return 1; } add_filter( ‘mepr_grace_expire_days’, ‘mepr_extend_renewal_grace_days’ );Continue reading
G-T2XZDKK0J5Continue reading
G-T2XZDKK0J5Continue reading
Allow SVG Files Upload (copy) (copy) (copy)
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading