Shamim Hasan

Forum Replies Created

Viewing 15 posts - 1,666 through 1,680 (of 2,495 total)
  • Author
    Posts
  • in reply to: Usage with Woocommerce – custom my account item #16200
    Shamim Hasan
    Keymaster

    I have updated above code. Please use this code.

    in reply to: Using admin only – how can admin send emails to anyone? #16198
    Shamim Hasan
    Keymaster

    You can use conditional
    eg.

    add_filter( 'fep_menu_buttons', function( $menu ) {
        if ( isset( $_GET['fepaction'] ) && $_GET['fepaction'] == 'message_box' ){
        $menu['cus_button'] = array(
            'title'		=> __( 'Edit', 'front-end-pm' ),
    	'action'	=> 'edit',
            'class'         => 'fep-button your_unique_class',
    	'priority'	=> 15,
        );
        }
        return $menu;
    });
    
    in reply to: Usage with Woocommerce – custom my account item #16193
    Shamim Hasan
    Keymaster

    add following code in your theme’s (child theme’s if any) functions.php

    add_filter( 'fep_query_url_without_esc_filter', function( $url, $args ){
        $url = add_query_arg( $args, 'http://example.com/my-page/messages' ); //your page url
        return $url;
    }, 10, 2 );
    
    in reply to: Usage with Woocommerce – custom my account item #16185
    Shamim Hasan
    Keymaster

    Is it a page? Does this have any page id?

    in reply to: Announcement not sending emails #16184
    Shamim Hasan
    Keymaster

    Please do not commented that out.
    PRO version announcement emails use queue system. read more in https://www.shamimsplugins.com/docs/front-end-pm-pro/getting-started-2/announcement-email-queue/
    See your setup and wait at least that much time. You can reduce time in setup to trigger quickly. As wordpress cron require visitor to work, make sure you have visitor.

    Let me know.

    in reply to: Problem with sending emails #16183
    Shamim Hasan
    Keymaster

    Please use fep_filter_before_email_send filter

    in reply to: Using admin only – how can admin send emails to anyone? #16181
    Shamim Hasan
    Keymaster

    I am sorry, had a typo in code. I have corrected it is last reply. please use that code.

    To add a menu button with unique class add following code in your theme’s (child theme’s if any) functions.php

    add_filter( 'fep_menu_buttons', function( $menu ) {
        $menu['cus_button'] = array(
            'title'		=> __( 'Edit', 'front-end-pm' ),
    	'action'	=> 'edit',
            'class'         => 'fep-button your_unique_class',
    	'priority'	=> 15,
        );
        return $menu;
    });
    
    in reply to: Using admin only – how can admin send emails to anyone? #16167
    Shamim Hasan
    Keymaster

    You can use Role to Role block feature. Please go to Front End PM PRO > Settings > Security > Role to Role Block
    Set “From Role” as any role (except Administrator as you want admin to send message ), “To Role” as “All Roles” and “Block For” as “New Message”. This block other role users from sending new message (They can send message to admin, if you set that).

    For changing order add following code in your theme’s (child theme’s if any) functions.php

    add_filter( 'fep_menu_buttons', function( $menu ) {
        $menu['message_box']['priority'] = 1;
        $menu['newmessage']['priority'] = 2;
        $menu['announcements']['priority'] = 3;
        $menu['directory']['priority'] = 4;
        $menu['settings']['priority'] = 5;
        return $menu;
    }, 50 );
    
    in reply to: Problem with sending emails #16165
    Shamim Hasan
    Keymaster

    No need to create legend for that.

    Proceed in following way.

    1. register your email template

    add_filter( 'fep_eb_templates', function( $templates, $where ) {
      $templates['new_message'] = 'Nieuw bericht';
      return $templates;
    }, 10, 2 );
    

    2. Now in emails/new_message.php file use

    $language = get_user_meta( fep_get_userdata( $user_email, 'ID', 'email'), 'icl_admin_language', true );
    
    if( 'fr' == $language ){
        require( fep_locate_template( 'emails/new_message_fr.php' ) );
    }
    

    Let me know.

    in reply to: Problem with sending emails #16144
    Shamim Hasan
    Keymaster

    Please follow https://www.shamimsplugins.com/docs/front-end-pm-pro/customization-front-end-pm-pro/create-own-email-template/

    Within your template conditionally include your user set language template.

    in reply to: Licence error #16126
    Shamim Hasan
    Keymaster

    Please give me screenshot of Settings page “Recipient” and “Security” tab. Also give me screenshot of new message page.

    in reply to: Licence error #16120
    Shamim Hasan
    Keymaster

    Please go to Front End PM PRO > Settings > Licenses, then empty license field and save changes and again input your license key and again save changes.

    Let me know.

    in reply to: How to Append Data into the Email / Message #16106
    Shamim Hasan
    Keymaster

    You can use fep_filter_message_before_send filter hook to append any information into message body.

    in reply to: Expand the settings #16073
    Shamim Hasan
    Keymaster

    You can use following code

    add_filter( 'fep_form_fields', function( $fields ){
        $fields['cus_key'] = array(
    	'type'			=> 'checkbox',
    	'value'			=> fep_get_user_option( 'cus_key', 1),
            'cb_label'		=> __("Your Label", 'front-end-pm' ),
    	'priority'		=> 35,
    	'where'			=> 'settings',
        );
        return $fields;
    });
    
    in reply to: Hook announcement send #16056
    Shamim Hasan
    Keymaster
    add_action( 'fep_save_announcement', 'send_something', 100, 3 );
    
    function send_something( $announcement_id, $announcement, $update ){
    
        echo '<pre>';
        print_r( fep_get_participant_roles( $announcement_id ) );
        echo '</pre>'; die;
    }
    
Viewing 15 posts - 1,666 through 1,680 (of 2,495 total)