Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
MemberPerks mp_cf7_custom_shortcode completa
// Add custom shortcodes to Contact Form 7 WP plugin
add_action( 'wpcf7_init', 'mp_cf7_custom_shortcode' );
function mp_cf7_custom_shortcode(){
wpcf7_add_form_tag( 'show_member_level', 'cf7_get_member_level' );
function cf7_get_member_level(){
$memberLevel = mp_get_member_level();
$value = 0;
$value = $memberLevel['member_level'];
return '<input type="hidden" name="member-level" value="'. $value .'" />';
Copy link

Buenas Tardes David, Tengo una duda este codigo que tu generaste se añade en el functions.php de wordpress???

Quedo atento muchas gracias.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment