Add some Hooks

This topic contains 3 replies, has 2 voices, and was last updated by WCFM Forum WCFM Forum 2 weeks, 4 days ago.

  • Author
    Posts
  • #93672
    Avatar
    fethi.env
    Participant

    HI!
    I created an addons for customise memberships plugin but I need to add some hooks,
    can you add this hooks, to add more customization:

    file: core/class-wcfmvm.php: betwin line 358-359

    $custom_color_data = apply_filters( 'wcfm_add_membership_custom_css',$custom_color_data);

    file: templates/vendor_membership.php:

    add this hook
    do_action ("wcfm_add_membership_custom_css_class_name",$wcfm_membership);

    like this:
    line 133
    <div class="wcfm_membership_box_wrraper wcfm_membership_box_wrraper_<?php echo $wcfm_membership_id; ?> <?php if( $wcfm_membership_id == $featured_membership ) { echo 'wcfm_featured_membership_box_wrraper'; } do_action ("wcfm_add_membership_custom_css_class_name",$wcfm_membership);?>">

    line 200:
    <div class="wcfm_membership_box <?php if( $wcfm_membership_id == $featured_membership ) { echo 'wcfm_featured_membership_box'; } elseif( $wcfm_membership_id == $free_membership ) { echo 'wcfm_free_membership_box'; } do_action ("wcfm_add_membership_custom_css_class_name",$wcfm_membership); ?>">

    add filter : line 245
    $wcfmvm_feature_custom_object = apply_filters( 'wcfm_membership_feature_custom_object',$wcfm_membership->ID);

    // add action 249
    do_action ("wcfm_membership_feature_custom_action",$wcfm_membership->ID,$membership_feature_list, $wcfmvm_feature_custom_object);

    // add action: line 251
    do_action ("wcfm_membership_feature_custom_css_class_name",$wcfm_membership->ID,$membership_feature_list,$wcfmvm_feature_custom_object);
    //like this
    <div class="wcfm_membership_element <?php do_action ("wcfm_add_membership_feature_custom_css_class_name",$wcfm_membership->ID,$membership_feature_list,$wcfmvm_feature_custom_object);?>">

    file: views/wcfmvm-view-memberships-manage.php:

    line betwin 240-241
    $wcfmvm_feature_custom_object = apply_filters( 'wcfm_add_membership_feature_custom_object',$membership_id);

    line betwin 250-251

    do_action ("wcfm_add_membership_feature_custom_css_class_name",$membership_id,$membership_feature_list,$wcfmvm_feature_custom_object);

    Thanks

    Attachments:
    You must be logged in to view attached files.
  • #93676
    Avatar
    fethi.env
    Participant

    Modified files

    Attachments:
    You must be logged in to view attached files.
  • #93682
    Avatar
    fethi.env
    Participant

    The last version with that hooks

    Attachments:
    You must be logged in to view attached files.
  • #93832
    WCFM Forum
    WCFM Forum
    Keymaster

    HI,

    templates/vendor_membership.php

    – Please override this at child-theme/wcfm/membership/vendor_membership.php and change as per your requirement.

    You may also create your custom membership table page and add that at WCFM Membership setting -> Custom Plan Page – https://ibb.co/ygpGDJd

    $custom_color_data = apply_filters( ‘wcfm_add_membership_custom_css’,$custom_color_data);

    – Why you are trying to add custom CSS from here. Add your custom CSS at child-theme’s style.css

    Thank You

You must be logged in to reply to this topic.