Skip to content

Commit

Permalink
Bug Fix: only affect pmpro_membership_card pages
Browse files Browse the repository at this point in the history
* BUG FIX: Fixed issue where the function pmpro_membership_card_save_post was executing for non membership card pages.
  • Loading branch information
andrewlimaza committed Apr 30, 2020
1 parent a07eff9 commit 3d4ebf7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pmpro-membership-card.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ function pmpro_membership_card_get_post_id()
function pmpro_membership_card_save_post( $post_id ) {
global $post;

if ( ! has_shortcode( $post->post_content, "pmpro_membership_card" ) ) {
return;
}

if ( !isset( $post->post_type) ) {
return;
}
Expand Down

0 comments on commit 3d4ebf7

Please sign in to comment.