I am new to coding. I am trying to get a different text on one of my button if the field is empty. The original code is:
<?php if ( $clpr_options->coupon_code_hide ) {
$button_text = fl_get_option( 'fl_lbl_show_coupon' );
$button_text = '<i class="icon-lock"></i>' . $button_text;
$class .= ' coupon-hidden';
}
?>
now I changed it to:
<?php if ( $clpr_options->coupon_code_hide ) {
$button_text = fl_get_option( 'fl_lbl_show_coupon' );
$button_text = '<i class="icon-lock"></i>' . $button_text;
$class .= ' coupon-hidden';
} else {
$coupon = get_post_meta( $post->ID, 'clpr_coupon_code', true );
$coupon == '';
$button_text = 'Angebot anzeigen';
}
?>
however it does not change the content it still shows the first if need some help.
Its not about $button_text
being empty, I would like to change the $button_text
if there is no content within clpr_coupon_code
Thanks for helping...