Skip to content

Commit

Permalink
Rename wc-order-attribution-input to wc-order-attribution-inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalec committed Feb 5, 2024
1 parent 265957b commit eceab9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Expand Up @@ -32,8 +32,8 @@
* @param {Object} values Object containing field values.
*/
function updateFormValues( values ) {
// Update `<wc-order-attribution-input>` elements if any exist.
for( const element of document.querySelectorAll( 'wc-order-attribution-input' ) ) {
// Update `<wc-order-attribution-inputs>` elements if any exist.
for( const element of document.querySelectorAll( 'wc-order-attribution-inputs' ) ) {
element.values = values;
}

Expand Down Expand Up @@ -130,7 +130,7 @@
* Define an element to contribute order attribute values to the enclosing form.
* To be used with the classic checkout.
*/
window.customElements.define( 'wc-order-attribution-input', class extends HTMLElement {
window.customElements.define( 'wc-order-attribution-inputs', class extends HTMLElement {
// Our bundler version does not support private class members, so we use a convention od `_` prefix.
// #values
// #fieldNames
Expand Down Expand Up @@ -172,7 +172,7 @@
if( input ) {
input.value = stringifyFalsyInputValue( this.values[ fieldName ] );
} else {
console.warn( `Field "${fieldName}" not found. Most likely, the '<wc-order-attribution-input>' element was manipulated.`);
console.warn( `Field "${fieldName}" not found. Most likely, the '<wc-order-attribution-inputs>' element was manipulated.`);
}
}
}
Expand Down
Expand Up @@ -330,11 +330,11 @@ private function output_origin_column( WC_Order $order ) {
}

/**
* Add `<wc-order-attribution-input>` element that contributes the order attribution values to the enclosing form.
* Add `<wc-order-attribution-inputs>` element that contributes the order attribution values to the enclosing form.
* Used for checkout & customer register forms.
*/
public function stamp_html_element() {
printf( '<wc-order-attribution-input></wc-order-attribution-input>' );
printf( '<wc-order-attribution-inputs></wc-order-attribution-inputs>' );
}

/**
Expand Down

0 comments on commit eceab9c

Please sign in to comment.