SBlancher
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-Polls] WP-Polls and Varnish – "Failed To Verify Referrer" ErrorAny suggestions on how to proceed? Maybe a different poll plugin?
Forum: Hacks
In reply to: User set_role setting role to 'None'Thanks, this worked!! Very grateful *bow* *bow*
Discovered that set_role functionality is flawed for some reason.
Forum: Hacks
In reply to: User set_role setting role to 'None'Right, a friend had pointed that out too. I have it properly in quotes in my code. Just for reference, here is the print_r of the user after set_role:
object(WP_User)#411 (7) { [“data”]=> object(stdClass)#448 (12) { [“ID”]=> string(4) “2076” [“user_login”]=> string(7) “Gandalf” [“user_pass”]=> string(34) “SOMETHING” [“user_nicename”]=> string(7) “gandalf” [“user_email”]=> string(28) “SOMETHING” [“user_url”]=> string(0) “” [“user_registered”]=> string(19) “2014-10-24 02:58:19” [“user_activation_key”]=> string(0) “” [“user_status”]=> string(1) “0” [“display_name”]=> string(7) “Gandalf” [“completed_registration”]=> string(5) “false” [“user_level”]=> int(0) } [“ID”]=> int(2076) [“caps”]=> array(1) { [“SisterhoodMember”]=> bool(true) } [“cap_key”]=> string(15) “wp_capabilities” [“roles”]=> array(0) { } [“allcaps”]=> array(1) { [“SisterhoodMember”]=> bool(true) } [“filter”]=> NULL } WP_User Object ( [data] => stdClass Object ( [ID] => 2076 [user_login] => Gandalf [user_pass] => SOMETHING. [user_nicename] => gandalf [user_email] => SOMETHING [user_url] => [user_registered] => 2014-10-24 02:58:19 [user_activation_key] => [user_status] => 0 [display_name] => Gandalf [completed_registration] => false [user_level] => 0 ) [ID] => 2076 [caps] => Array ( [SisterhoodMember] => 1 ) [cap_key] => wp_capabilities [roles] => Array ( ) [allcaps] => Array ( [SisterhoodMember] => 1 ) [filter] => )
I believe the wp_capabilities [roles] => Array( ) being empty is disturbing. But wp_capabilities don’t determine which role you are… it’s all so frustrating. Please help!!
Forum: Plugins
In reply to: [ContestHopper for WordPress] Strict Standards ErrorTo the Author: I installed everything properly, I need help solving this problem. Please respond ASAP.
Forum: Plugins
In reply to: [ContestHopper for WordPress] Strict Standards ErrorAlso emails are not being sent, I’m assuming this has something to do with it.
Can anyone help me with this problem??
Ok so here is the code I’ve inserted into ‘functions.php’… It’s not working though (surprise!). I’m testing it by applying a coupon that gives the product a 100% discount so that should trigger the hook. Any tips on why this isn’t working?
function sisterhood_membership() {
$order = new WC_Order($order_id);
$items = $order->get_items();
$sis_mem_prod = false;
$wp_user_object = new WP_User($current_user->$ID);foreach($items as $item) {
$product_id = $item[‘product_id’];
if($product_id == 27968) {
$sis_mem_prod = true;
}
}if($sis_mem_prod) {
$wp_user_object->set_role(‘Sisterhood Member’);
}error_log(“Payment has been received for order $order_id”, 0);
}add_action(‘woocommerce_payment_complete’, ‘sisterhood_membership’);
Forum: Themes and Templates
In reply to: [Editor] Radio Buttons Not Appearing (Chrome Only)My colleague also says it was not working on the Safari platform (mobile, possibly both). You may want to look into that as well. Thank you for the prompt reply.