• Resolved KoolPal

    (@koolpal007)


    Hi

    It would be great if you could help me with this.

    [path]\wp-content\plugins\classified-listing-pro\app\Controllers\Hooks\TemplateHooks.php

    How do I add another condition to this line

    if ( Fns::registered_user_only( 'listing_seller_information' ) && ! is_user_logged_in() )

    to check for

    if ( $member && ! $member->is_expired() )

    How do I add this condition to check?

    Thanks a lot

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Ali Akbar Reyad

    (@alireyad)

    Hi,
    Use this function to get membership info for a user –
    $member = rtclStore()->factory->get_membership(user_id);

    Thank You

    Thread Starter KoolPal

    (@koolpal007)

    Sorry, I did not understand.

    I was looking for a code snippet which checks for the following conditions

    1.Registered

    2.Logged in

    3.Has a active paid membership

    If no, then show him a specific message

    Can you please help with this?

    Thanks

    Thread Starter KoolPal

    (@koolpal007)

    @alireyad Any luck with this?

    I can figure the logic but I am poor at coding (learning now)

    Can you please help with this?

    if ( Fns::registered_user_only( 'listing_seller_information' ) && ! is_user_logged_in()) {
    						remove_all_actions( 'rtcl_listing_seller_information' );
    			add_action( 'rtcl_listing_seller_information', [ __CLASS__, 'add_user_login_link' ], 1 );
    		}
    	}

    I am trying to add the condition to above code at Line 78 in [path]\wp-content\plugins\classified-listing-pro\app\Controllers\Hooks\TemplateHooks.php

    Additional check required is to check if user has an Active membership.

    Please help!

    Thanks

    Plugin Support Ali Akbar Reyad

    (@alireyad)

    Hi,
    I see, you are using pro version of plugin. Please, create support ticket from our site. Support team will help you to achieve your necessary things.

    Thank You

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Additional condition in code’ is closed to new replies.