Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › extending WCFM_Custom_Field_Support class
- This topic has 3 replies, 2 voices, and was last updated 4 years, 10 months ago by WCFM Forum.
- AuthorPosts
- January 27, 2020 at 3:26 am #104083ian-guyParticipant
Hi,
I am currently working on single page layout and have looked at available files and come up with what I think would work for me. I would like to extend the WCFM_Custom_Field_Support class by adding a single function which would use the get_template() function currently available.
I have 2 questions. is it possible to extend the existing WCFM_Custom_Field_Support class with a simple code snipet or should i write a plugin that depends on wcfm. And second I have a php file which would be loaded by the get_template() where would be the best place to put it so that it survives updates. I see in the files that it loads from child theme first but Im not sure where would be best to put it and how i would point to it in my code. im currently using
$WCFM->template->get_template( ‘wcfm-agrilinks-customfield-products.php’ ); but no joy at this time, the file currently is in …/themes/themename/page-templates and in …./themes/themename/wcfm/products-manager/wcfm-agrilinks-customfield-products.phpthank you for this wonderful product.
- January 27, 2020 at 7:42 am #104097ian-guyParticipant
I copied the custom template into …./themes/themename/ and found it to work for my purpose.
- January 27, 2020 at 7:46 am #104098ian-guyParticipant
I would greatly appreciate feedback on extending the WCFM_Custom_Field_Support and keeping it persistent after updates.
- February 6, 2020 at 1:45 pm #105732WCFM ForumMember
Hi,
is it possible to extend the existing WCFM_Custom_Field_Support class with a simple code snipet or should i write a plugin that depends on wcfm.
– NO, you have to write your code using WCFM hooks and filters.
Thank You
- AuthorPosts
- You must be logged in to reply to this topic.