Forum Replies Created

Viewing 15 replies - 1 through 15 (of 47 total)
  • Thread Starter benorange

    (@benorange)

    Thanks @hamza1010

    Thread Starter benorange

    (@benorange)

    Hi @omardabbas,

    Thanks!

    Thread Starter benorange

    (@benorange)

    Hi @3sonsdevelopment,

    Thanks for letting me know

    Bw

    Thread Starter benorange

    (@benorange)

    Hi @ndiego,

    Thanks for follow up and sorry for the late reply. As my use case is a single element ‘hide’ and we are plugin heavy.. I am going with a new function in functions.php that I’ll call before any html on the pages that need it. The function will check user group in wp_usermeta.

    The user group meta is added by ACF and ecommerce is a few woo plugins for interest.

    Bw,
    Ben

    Thread Starter benorange

    (@benorange)

    Hi @danndumia,

    Thanks for reply.

    Woo commerce Payments would offer Aple/Google Pay via Stripe, as I understand it, so aside from moving payment completion in-page it would not overcome the issue that there is already a franchise (separate company) using the Stripe gateway.

    It appears that the multi-account link you shared is for one client/company creating more that one account. We do not need two accounts, we only need one. Rather, if we stay with Stripe we would need the gateway to handle two separate Stripe accounts.

    As I was writing this reply I heard back from Stripe:

    `3 Sons Development – a11n wrote:

    Hi @benorange,

    Can Stripe payment gateway plugin be used with two different stripe accounts/companies at the same time (eg, a franchise product sale and a direct product sale)?

    Good question! It’s not possible to use two different Stripe accounts with this Stripe. You may be able to use this one along with another Stripe plugin from a third party. I can’t promise that will work but it would be the only way to make that work.`

    So the search continues for a reliable payment gateway for Woo that offers Apple and Google pay.

    We can’t use Stripe reliably as it is already used with a different Stripe account, and I don’t want to use Square beccause the reviews are not encouraging.

    Thanks!

    Bw,
    Ben

    Thread Starter benorange

    (@benorange)

    Hi @3sonsdevelopment,

    Thanks for reply.

    Can Stripe payment gateway plugin be used with two different stripe accounts/companies at the same time (eg, a franchise product sale and a direct product sale)?

    -Something like this for paypal: PayPal for WooCommerce Multi-Account Management

    I am trying ‘Payment Gateways per Products for WooCommerce’ and is working well.

    Bw,
    Ben

    Thread Starter benorange

    (@benorange)

    Hi @peterschulznl,

    Thanks for follow up and advice. Not resolved but I have half a plan, not enough to be helpful to anyone else yet. Will close ticket though.

    Bw,
    Ben

    Thread Starter benorange

    (@benorange)

    Hi Joachim,

    That’s really kind, thanks for the offer. The custom fields plugin is ACF. As mine is a single use case and we have a fair few plugins already.. I decided to go with a more manual approach, calling a function from each restricted resource page template. In case it’s helpful to anyone and comments welcome (still figuring it out), this is only a draft and haven’t found the ‘last user record update date’ call yet but it’ll look something like this probably:

    function authorise_access(){
    	$resource_type = get_field('resource-type'); 
    	$user_group = get_user_meta('user-group', get_current_user_id() );
    	$last_update = strtotime(get_user_meta(‘LAST_USER_MODIFIED_DATE‘, get_current_user_id() ));
    	$current_date_s = time(); 
            $secs = $current_date - $last_update;
            $days = $secs / 86400;
    	$permissions = [
    		'Type 1' => ['User group 1', 'User group 1 & 2', ‘User group 1 & 3’], 
    		'Type 2' => ['User group 2', 'User group 1 & 2', ‘User group 2 & 3’], 	
    		'Type 3' => ['User group 3', 'User group 1 & 3', ‘User group 2 & 3’]
    	];
    	if(in_array($user_group, $permissions[$resource_type]) ){ 
    		If ($days < 366){
    	               <style type="text/css">.advert-banner{ 
                           display:none; 
                    	}</style>
    			return null; 
    		}
    	}
            header('Location: https://'. get_site_url.'/promotion');
    }

    This requires a ‘authorise_access();’ call in restricted pages’ templates and using ACF to add the resource-type field and values for restrictions to compare to user groups.

    This function also hides a promo div as these user groups have already signed up.

    Bw
    Ben

    Thread Starter benorange

    (@benorange)

    Ok thanks anyway!

    Thread Starter benorange

    (@benorange)

    Note, the access to links granted by access level will be set to expire after 12 months so the users in this list could be filtered by ‘created in in last 12 months’. Then it would ony be a few hundred users..

    Bw,
    Ben

    Thread Starter benorange

    (@benorange)

    Hi @bcworkz,

    Thanks for the fast reply. I appreciate you taking the time.

    How many users are involved?
    There are about 2000 users

    Is there anything in the DB that can define who belongs to what group?
    Yes, user group is a custom field for user added at registration. Users who only book an exam without a course have no assigned value for user group but updating null group to null access level would be ok.

    I’m guessing the process would timeout with the number of users but for my understanding, would the following work if there were only a few users?

    SELECT * FROM users;
    foreach ( users as $user ) {
    	$value = get_user_meta( $user, 'group_id', true );
       	$success = update_user_meta( $user, 'restrict_level', $value );
       	if ( ! $success ) echo 'Adding meta failed for user ID ', $user, ".<br>\n";
    }

    The site has lots of resources but from what you said I’m guessing I would have to break up the list and do them in batches..

    I am clear on the page template -> execute from browser process. I like that plan.

    Bw,
    Ben

    Forum: Plugins
    In reply to: [Groups] Family accounts
    Thread Starter benorange

    (@benorange)

    Thanks @proaktion,

    I will do some work on this. Before I follow up. Grateful for you taking the time.

    Bw,
    Ben

    Thread Starter benorange

    (@benorange)

    Hi @swathiswpfront,

    Thanks for reply.

    We currently only use student user accounts. The new requirement will involve a new user type for parents or to make the sibling records available to each respective sibling account.

    Either of these methods would enable a multi child parent to view all of their childrens’ data (homework results) in one place, and ultimately to be able to upload homework for all children also in one place.

    Bw,
    Ben

    Forum: Plugins
    In reply to: [Groups] Family accounts
    Thread Starter benorange

    (@benorange)

    Hi @proaktion,

    Thanks. Interesting reading.

    Would each family require a different custom page each to view group data?

    The score page will be the same page for each user so I am guessing I still need to handle the ‘custom query and page with access to other users data’ part of problem. This is helpful though for how to display. I guess we’ll need a cutome page for each family but there are not too many.

    Users don’t need to create pages, only view data from child dbs and upload new results if possilbe.

    Thanks again.

    Bw,
    Ben

    • This reply was modified 2 years, 5 months ago by benorange. Reason: thought about it
    Thread Starter benorange

    (@benorange)

    Thanks Peter,

    Will do!

    Bw,
    Ben

Viewing 15 replies - 1 through 15 (of 47 total)