mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
🐛 Fix incorrect hook usage
This commit is contained in:
parent
a95296b8ed
commit
c7e5395e12
1 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ import { OnboardingHooks, PRODUCT_TYPES } from '../../../data';
|
|||
const PRODUCTS_CHECKBOX_GROUP_NAME = 'products';
|
||||
|
||||
const StepProducts = () => {
|
||||
const { products, toggleProduct } = OnboardingHooks.useProducts();
|
||||
const { products, setProducts } = OnboardingHooks.useProducts();
|
||||
|
||||
return (
|
||||
<div className="ppcp-r-page-products">
|
||||
|
@ -28,7 +28,7 @@ const StepProducts = () => {
|
|||
) }
|
||||
name={ PRODUCTS_CHECKBOX_GROUP_NAME }
|
||||
value={ PRODUCT_TYPES.VIRTUAL }
|
||||
changeCallback={ toggleProduct }
|
||||
changeCallback={ setProducts }
|
||||
currentValue={ products }
|
||||
type="checkbox"
|
||||
>
|
||||
|
@ -70,7 +70,7 @@ const StepProducts = () => {
|
|||
) }
|
||||
name={ PRODUCTS_CHECKBOX_GROUP_NAME }
|
||||
value={ PRODUCT_TYPES.PHYSICAL }
|
||||
changeCallback={ toggleProduct }
|
||||
changeCallback={ setProducts }
|
||||
currentValue={ products }
|
||||
type="checkbox"
|
||||
>
|
||||
|
@ -97,7 +97,7 @@ const StepProducts = () => {
|
|||
) }
|
||||
name={ PRODUCTS_CHECKBOX_GROUP_NAME }
|
||||
value={ PRODUCT_TYPES.SUBSCRIPTIONS }
|
||||
changeCallback={ toggleProduct }
|
||||
changeCallback={ setProducts }
|
||||
currentValue={ products }
|
||||
type="checkbox"
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue