about varible option name can't change

WooCommerce Multivendor Marketplace – Home Forums WCFM about varible option name can't change

This topic contains 5 replies, has 2 voices, and was last updated by WCfM Forum WCfM Forum 6 days, 1 hour ago.

  • Author
    Posts
  • #38767 Reply

    MOHO
    Participant

    I know WC limit this change.

    Could i display some red error message, let the user know can’t change.

    Attachments:
    You must be logged in to view attached files.
  • #38843 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    Hi,

    Send me message what you want to show, I will give you according code for this.

    Thank You

  • #38846 Reply

    MOHO
    Participant

    use this chinese word “目前規格選項不可修改,請刪除再新增。”

    Thanks

  • #38892 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    HI,

    Kindly add this code for the purpose ->

    function wcfm_product_custom_attributes_0312_hints( $attr_fields, $field_name ) {
    	if( isset($attr_fields[$field_name]) && isset($attr_fields[$field_name]['options']) && isset($attr_fields[$field_name]['options']['name']) ) {
    		$attr_fields[$field_name]['options']['name']['desc']= '目前規格選項不可修改,請刪除再新增';
    		$attr_fields[$field_name]['options']['name']['desc_class']= 'attribute_ele attribute_ele_hints';
    	}
    	return $attr_fields;
    }
    add_filter( 'wcfm_product_custom_attributes', 'wcfm_product_custom_attributes_0312_hints', 50, 2 );

    Thank You

  • #39130 Reply

    MOHO
    Participant

    I add in child theme, but i didn’t see red error message.

    Attachments:
    You must be logged in to view attached files.
  • #39154 Reply
    WCfM Forum
    WCfM Forum
    Keymaster

    HI,

    I gave you code for showing a message like this along with attributes -> https://ibb.co/yFzxqrh

    Well, add this CSS as well ->

    p.attribute_ele_hints {
        display: block;
        width: 100%;
        margin-left: 39%;
        margin-bottom: 15px;
    }

    Thank You

Reply To: about varible option name can't change
Your information: