vipworks
Forum Replies Created
-
Hi,
Thanks for the response.Could you please show me providing code examples how do I retrieve userID from order object without using get user?
Hi,
I added this code in functions.php, but it didn’t update the meta field.add_action( 'pmpro_added_order', 'fg_reset_user_meta' ); function fg_reset_user_meta( $MemberOrder ){ $userObject = $MemberOrder->getUser(); $userID = $userObject->ID; update_user_meta( $userID, 'post1_availed', 'yes'); }
Could you please guide what’s wrong in this code?
- This reply was modified 4 years, 8 months ago by vipworks.
Forum: Developing with WordPress
In reply to: Disable button after one click per userWhich one would be the best practice.. Cookies or saving user IDs to post meta or saving Post IDs to user meta?
Forum: Developing with WordPress
In reply to: Disable button after one click per userI know how to save meta values.
My question is how to save it on a per post basis.
Like on Post A, he clicked the button and it will be disabled.
but on Post B, he should still be able to click it.Forum: Developing with WordPress
In reply to: Disable button after one click per userYes, I need the button to function only for logged in users.
Could you please explain more on how do I store it on user meta table?
Hi, thanks for the quick response.
Does that hash always remain the same for a particular form?Would we need to do something like this inside that filter function?
if ( !isset( $form['gfexcel_hash']; ) ) { //disable fields code here }
Regards,
Vipworks- This reply was modified 4 years, 8 months ago by vipworks.