Add some Hooks

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 3 reply threads
  • Author
    Posts
    • #93672
      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
      fethi.env
      Participant

      Modified files

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

      The last version with that hooks

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

      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

Viewing 3 reply threads
  • The topic ‘Add some Hooks’ is closed to new replies.