This commit is contained in:
paul sealock 2024-06-03 23:26:08 +12:00
parent 79f6c4d2cb
commit a837e52f80
1 changed files with 2 additions and 2 deletions

View File

@ -22,6 +22,7 @@ export const Content = ( { data } ) => {
const formElements = formRef.current.querySelectorAll(
'input' // For now. There will be more.
);
const data = {};
formElements.forEach( ( input ) => {
const value =
@ -42,7 +43,6 @@ export const Content = ( { data } ) => {
const handleSubmit = async ( event ) => {
event.preventDefault();
console.log( 'Submitting form', formData );
try {
setIsBusy( true );
@ -57,7 +57,7 @@ export const Content = ( { data } ) => {
if ( response.status === 200 ) {
createNotice(
'success',
__( 'Options saved successfully', 'woocommerce' )
__( 'Settings saved successfully', 'woocommerce' )
);
} else {
throw new Error();