• Resolved Flávio

    (@fuba182)


    Which database tables do I have to delete so that when reinstalling the plugin it will have the default information?

    Whenever I reinstall it, it has the latest settings and I need it to come back from deafult because I made some changes in the checkout fields.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Flávio

    (@fuba182)

    I use the address number field here in Brazil. We had to change the TYPE of this field to URL, due to a bug in the automatic filling of the card by chrome that was filling in the number field. However, as he had already installed and configured his plugin, he did not catch the change. The field continues with the text TYPE. When uninstalling the plugin everything is normal. I believe that returning the settings to default will capture this change in the field.

    Plugin Contributor sanesh_acowebs

    (@saneshacodez)

    Hi, currently we don’t have the option to reset settings to default. You need to manually change the setting. We will try to add a reset button option on the upcoming future version of our plugin.

    Thread Starter Flávio

    (@fuba182)

    Changing the positions manually to standard, in this case does not solve. It would have to be a way to uninstall the plugin and when re-installing it again, the plugin would return to default and capture the changes that were made.

    If you inform me of the database tables that were saved you could try to adjust here, or maybe there is another simpler way.

    What is happening:

    We changed the TYPE of the NUMERO field to URL using this code:

    add_filter( 'woocommerce_checkout_fields', 'limita_checkout_fields' );
    function limita_checkout_fields( $fields ) {
    
    $fields['shipping']['shipping_number']['type'] = 'url';
    return $fields;
    }

    On the website we made this change before installing its plugin, he recognized this change and stayed like this in the field. It’s working.

    see that it does not inform here the TYPE as URL more recognizes and works.

    On the site where I installed the plugin first and then made the change to the code, it does not recognize the change. Even uninstalling and reinstalling the plugin again. He always recognizes the number field with TYPE TEXT … I believe it is because he saved some record that the code is not able to change after the plugin is installed.
    see that on the site where the plugin was installed first and then the code change was made .. even after uninstalling the plugin it does not recognize the code change

    Could you help us? Thanks

    • This reply was modified 4 months ago by Flávio.
    • This reply was modified 4 months ago by Flávio.
    Plugin Contributor sanesh_acowebs

    (@saneshacodez)

    Hi, we have checked your concern. Currently we don’t have a “url” sub-type that’s why it is not set as selected on the backed editor page. But you don’t need to select any type from selection if you are using the code that is shared. It will continue to work on the front-end, even after there is no selection on the back-end editor. Please check. We will check the possibility to add “url” sub-type on the future version of our plugin. 

    Thread Starter Flávio

    (@fuba182)

    Thanks for the feedback. I tried not to leave any type selected, but it does not allow in the front end of the plugin … I must select one of the options: Text, Email, Password and Phone

    Plugin Contributor sanesh_acowebs

    (@saneshacodez)

    Hi, can you please change your code to below given format. Because we need some additional parameters as in the code. Also note that you need to add some extra codes to validate url type if required as we are not supporting that type.

    add_filter( 'woocommerce_checkout_fields' , 'awcfe_custom_override_checkout_fields' );
    
    function awcfe_custom_override_checkout_fields( $fields ) {
    	
    	$fields['shipping']['shipping_shiping_number'] = array(
    		'type'      => 'url', // field type
    		'name'      => 'shipping_shiping_number', // field name 
    		'label'     => __('Shipping number', 'woocommerce'),
    		'class'     => array('form-row-wide'), 
    		'col'       => 6, // 6 for full width, 3 for half width
    		'clear'     => true,
    		'priority'  => 5,
    		'custom'    => true,
    		'show_in_email' => true,
    		'show_in_order_page' => true,
    	);
    
    	return $fields;
    }
    Thread Starter Flávio

    (@fuba182)

    thanks for the feedback, i will test the code.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.