Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WC Marketplace › Button Tex – Adding a external/affiliate product
- This topic has 5 replies, 2 voices, and was last updated 5 years, 6 months ago by WCFM Forum.
- AuthorPosts
- June 4, 2019 at 4:04 pm #65894r_guayaquilParticipant
Hi,
Is there a way i can set as default the button text when adding a new external/affiliate product? I dont want the vendors to type any text they would like.
Thank you!
Attachments:
You must be logged in to view attached files. - June 5, 2019 at 6:25 pm #66055WCFM ForumMember
HI,
It’s possible to set default text and make that field non-editable for vendors.
Please know me what you want to set as “Default Label”?
Thank You
- June 5, 2019 at 6:37 pm #66060r_guayaquilParticipant
Hi,
Thats awesome. I want to set as defualt label “VER OFERTA”.
Thanks a lot!
- June 5, 2019 at 8:25 pm #66105WCFM ForumMember
HI,
Please add this code snippet to your site –
add_filter( 'wcfm_product_manage_fields_pricing', function( $pricing_fields, $product_id, $product_type ) { if( isset( $pricing_fields['button_text'] ) ) { $pricing_fields['button_text']['value'] = 'VER OFERTA'; $pricing_fields['button_text']['attributes'] = array( 'readonly' => true ); } return $pricing_fields; }, 50, 3 );
Thank You
- June 6, 2019 at 1:54 am #66150r_guayaquilParticipant
Hi,
Thanks for the code. It works perfect!
The vendors wont have any problems uploading their products with a csv file as long as the button text in the file is always VER OFERTA right?. Also, the code wont cause problems with updates ?
Thank you so much!
- June 6, 2019 at 5:47 pm #66251WCFM ForumMember
HI,
The vendors wont have any problems uploading their products with a csv file as long as the button text in the file is always VER OFERTA right?. Also, the code wont cause problems with updates ?
– Vendor will not able to change this and update will not hamper anything.
Thank You
- AuthorPosts
- You must be logged in to reply to this topic.