jospo
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
Thanks!
Forum: Plugins
In reply to: [YITH WooCommerce Product Add-Ons] Undefined constant error after updateHello,
Even after updating to 2.0.5.1 I can still see the warning, this time on different line and in different php file:
Warning : Use of undefined constant YITH_WAPO_SECRET_KEY - assumed 'YITH_WAPO_SECRET_KEY' (this will throw an Error in a future version of PHP) in /www/wp-content/plugins/yith-woocommerce-product-add-ons/includes/classes/class.yith-wapo.php on line 121.
Thank you for your help!
Petr- This reply was modified 3 years, 3 months ago by jospo.
Hello, thanks for looking into this issue. I have found a working solution so I am posting it here in case anyone faces the same problem.
$user_roles = $current_user->roles; $user_role = array_shift( $user_roles ); /** * * Check the current user can read private pages. * */ $private = current_user_can( 'read_private_pages', $page->ID ); /** * * Get the roles that have access to the associated page. * */ $restricted = get_post_meta( $page->ID, '_members_access_role' ); /** * * Find and echo only pages where the user has access to private pages and the <code>users role</code> is equal to the <code>role</code> restriction on the page set by MembersPress. * */ if( ( $private ) && ( $user_role == in_array( $user_role, $restricted ) ) ) { echo $page->post_title . "<br/>"; }
- This reply was modified 3 years, 7 months ago by jospo.
Forum: Plugins
In reply to: [qTranslate] qTranslate not working in WP 3.4.1Does not work for me either. I am using WP 3.4.1 and qTranslate 2.5.30 and I modified the qTranslate.php file to support 3.4.1 version. However when I click on Pages, the page when you can edit the page is not completely loaded. You can just see the caption and no editor.
I tried different combinations (dev version with WP 3.4.1, older version 2.5.27 with WP 3.4, etc.) but with no luck.
Do you guys have any idea what can be wrong?
Thanks a lot.
Viewing 4 replies - 1 through 4 (of 4 total)