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.wordpress.org/reference/functions/do_shortcode/
Thanks
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?
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?
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,