D
D
DimDim77782019-05-04 13:03:40
WordPress
DimDim7778, 2019-05-04 13:03:40

How to make checkbox active in Woocommerce?

Hello.
There is this code:

"is_virtual" => array('desc' => __('Virtual', 'wc-frontend-manager') , 'type' => 'checkbox', 'class' => 'wcfm-checkbox wcfm_ele wcfm_half_ele_checkbox simple booking non-variable-subscription non-job_package non-resume_package non-redq_rental non-accommodation-booking', 'desc_class' => 'wcfm_title wcfm_ele virtual_ele_title checkbox_title simple booking non-variable-subscription non-job_package non-resume_package non-redq_rental non-accommodation-booking', 'value' => 'enable', 'dfvalue' => $is_virtual),

which makes it possible to tick the virtual checkbox (see picture)
5ccd630e44b80629306499.jpeg
Tell me how to make the checkbox immediately ticked by default in the virtual checkbox? How should I change the above code?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2019-05-04
@DimDim7778

replace 'dfvalue' => $is_virtual with 'dfvalue' => 'enable '

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question