2017-08-09 11 views
0

この行に「シルバー」と「ゴールド」を追加するには、現在のコードで「ゴールド」プランにいくつかの機能を適用します。「シルバー」と「ゴールド」の両方に使用します。Ifステートメント - ワードプレス

$subscription = rcp_get_subscription(get_current_user_id()); 
if($subscription == 'Gold') { 
    // do something here 
} 

http://docs.restrictcontentpro.com/article/1653-rcpgetsubscription

ありがとうございます。

答えて

0

あなたが実際に望むのは、ANDではなく、サブスクリプションはシルバーとゴールドの両方ではありません。

if($subscription == 'Gold' || $subscription == 'Silver') { 
    // do something here 
} 
+0

正確に "または"です。ありがとうございました。 – ooobe