Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM › Anyone familiar with editing code? Also – Handy piece of code for your website
Tagged: code, code edit, instructions to vendors, messages, messaging
- This topic has 3 replies, 2 voices, and was last updated 4 years, 5 months ago by SSC.
- AuthorPosts
- June 5, 2020 at 8:30 pm #138848tech2Participant
He all,
I wondered if anyone can help me with this. I have a code snippet (php) that I use to instruct users not to put outside links in their product descriptions (feel free to use it yourselves).
What I need is the code to be edited to show a message in the inquiry section so vendors and customers can see that they are not allowed to share outside communication inforamtion like Wickr, email, facebook, whatsapp, wechat or and other messaging services and if they do, their accounts will be disabled. I can obviously write the required text, I just need the code edited for this to show in the internal messaging service within WCFM between the vendor and the cstomer..
Here is the original code:
add_filter( 'wcfm_product_manage_fields_content', function( $content_fields, $product_id, $product_type ) { if( isset( $content_fields['excerpt'] ) ) { $content_fields['excerpt']['desc'] = 'Please do not add outside links to your product pages. This is not allowed!'; } if( isset( $content_fields['description'] ) ) { $content_fields['description']['desc'] = 'Please do not add outside links to your product pages. This is not allowed!'; } return $content_fields; }, 50, 3 );
Thank you so much in advance
- June 15, 2020 at 10:08 pm #141489SSCParticipant
Where exactly do you want the message to show?
There are not many filters for the enquiry form.
This snippet will replace the title on the form. The only other filter is for the recaptchagglcptch_display_recaptcha
add_filter( 'wcfm_enquiry_form_heading', function( $wcfm_enquiry_form_heading ) { $wcfm_enquiry_form_heading = 'custom text here'; return $wcfm_enquiry_form_heading; }, 50, 1 );
The only filters I see for the ‘inquiry boards’ page, which the vendors see, is for data filters. i.e. sold by, date range, products, etc.
- June 16, 2020 at 11:05 am #141611tech2Participant
I would like it in the input field for when vendors and customers use the internal messaging system. Essentially tells them not to share outside options to communicate to keep sales on the platform
- June 16, 2020 at 1:25 pm #141631SSCParticipant
Best option would be to copy the template /wc-frontend-manager/views/enquiry/wcfm-view-enquiry-form.php to a child theme, as there are no other hooks/filters for the inquiry forms.
- AuthorPosts
- You must be logged in to reply to this topic.