Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › "Capability" template not override.
- This topic has 4 replies, 2 voices, and was last updated 6 years, 6 months ago by
WCFM Forum.
- AuthorPosts
- September 10, 2018 at 10:20 am #31261
info31
ParticipantHello,
I have created custom product type on my website. I want show that product type into the “Capability” tab. I have override the code of “Capability” template into child theme but template override not working for me.
My template path is “wp-content/themes/my-listing-child/wcfm/capability”, php file name is “wcfm-view-capability.php”. I have to tried with echo exit but no luck. Please check attachment for more clearance.Please help me for solve this problem asap.
Thanks in advance!!!
Attachments:
You must be logged in to view attached files. - September 11, 2018 at 5:37 am #31282
info31
ParticipantHello,
Are you check my problem? I am waiting for your response. I need to do this asap. Please give me guidance for override template.
Thanks in advance!!!
- September 11, 2018 at 10:30 am #31326
WCFM Forum
MemberHi,
WCFM does not allow to override “capability” template.
Well it’s off course possible to add that custom product type in capability, please use this code for the purpose –
add_filter( 'wcfm_capability_settings_fields_product_types', function( $product_types, $handler = 'wcfm_capability_options', $wcfm_capability_options = array() ) { global $WCFM; $test_booking = ( isset( $wcfm_capability_options['test_booking'] ) ) ? $wcfm_capability_options['test_booking'] : 'no'; $product_types["test_booking"] = array('label' => __('Test Booking', 'wc-frontend-manager') , 'name' => $handler . '[test_booking]','type' => 'checkboxoffon', 'class' => 'wcfm-checkbox wcfm_ele', 'value' => 'yes', 'label_class' => 'wcfm_title checkbox_title', 'dfvalue' => $test_booking ); return $product_types; }, 60, 3 );
Change “test_booking” with your custom product type.
Thank You
- September 12, 2018 at 10:09 am #31457
info31
ParticipantThank you for your response, I have done this code from my side.
Thanks for support 🙂
- September 12, 2018 at 1:58 pm #31492
WCFM Forum
MemberYou are welcome 🙂
- AuthorPosts
- The topic ‘"Capability" template not override.’ is closed to new replies.