• Resolved aganis

    (@aganis)


    I need user shortcode restricted content bat witch php function, forse example I need enable button when the user have a plan ID:2

    in shortcode is:
    [arm_restrict_content plan=”2,” type=”show”][buttom][/arm_restrict_content]

    how do i convert this to php function?

    If ({{function}}) { echo “<input…”; }

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author reputeinfosystems

    (@reputeinfosystems)

    Hello,

    I understood your concern and you may need to add WordPress do_shortcode function to execute shortcode from the php file.

    Please refer reference URL: https://developer.www.ads-software.com/reference/functions/do_shortcode/

    Thanks

    Plugin Author reputeinfosystems

    (@reputeinfosystems)

    let me know if there is anything else.

    Thread Starter aganis

    (@aganis)

    No, you don’t understand what I mean …. what is the reference php function to perform the same procedure as the shortcode?

    Plugin Author reputeinfosystems

    (@reputeinfosystems)

    Hello,

    You will not be able to achieve with PHP functions. You just need to write the do_shortcode function (WordPress function) which will be executed just fine from the PHP file.

    For example,

    <?php

    echo do_shortcode(‘[arm_restrict_content plan=”2,” type=”show”][button][/arm_restrict_content]’);

    ?>

    Thanks,

    Thread Starter aganis

    (@aganis)

    no, I was asking to just use the function, not to call the schortcode …

    $arm_user_plan = get_user_meta($current_user_id, ‘arm_user_plan_ids’, true);

    I found this function that allows me to understand which membership the user is subscribed to but I cannot know if the subscription is valid or suspended

    what can I do?

    Plugin Author reputeinfosystems

    (@reputeinfosystems)

    Hello,

    I am sorry for the delay in reply.

    Okay. I understood your request to get the data of purchased plan IDs. For get suspended plan IDs you need to get the usermeta of ‘arm_user_suspended_plan_ids’ and after that, you can allow the member if plan ID is not exists in the suspended plan ID array.

    Thanks,

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Manage limit parzial content with php function’ is closed to new replies.