Anyone familiar with editing code? Also – Handy piece of code for your website

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM Anyone familiar with editing code? Also – Handy piece of code for your website

Viewing 3 reply threads
  • Author
    Posts
    • #138848
      tech2
      Participant

      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

    • #141489
      SSC
      Participant

      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 recaptcha gglcptch_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.

    • #141611
      tech2
      Participant

      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

    • #141631
      SSC
      Participant

      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.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.