nilesh6018
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [Payment Plugins for PayPal WooCommerce] Checkout Additional Field ValidationThan you for the clarification can you please provide me an example with the use of ” wc_ppcp_checkout_validation “?
I will try from my side and I will let you know if I face an issue after use the ” wc_ppcp_checkout_validation “.Forum: Plugins
In reply to: [Payment Plugins for PayPal WooCommerce] Checkout Additional Field ValidationThank you for your prompt replay,
We are use additional WooCommerce fields just before Place order button, does this field validate before I place an order using PayPal method?add_action('woocommerce_review_order_before_submit', 'display_country_based_checkbox');
function display_country_based_checkbox() {
woocommerce_form_field( 'conformation', array(
'type' => 'checkbox',
'class' => array('form-row conformation'),
'label_class' => array('woocommerce-form__label woocommerce-form__label-for-checkbox checkbox'),
'input_class' => array('woocommerce-form__input woocommerce-form__input-checkbox input-checkbox'),
'required' => true,
'label' => 'Der Versand von durchgeführten Tests aus anderen L?ndern nach Deutschland erfolgt auf die Kosten der Kundin. Der Betrag kann je nach Land abweichen.',
));
}also I validate field using this method
add_action('woocommerce_checkout_process', 'validate_country_checkbox_field');
function validate_country_checkbox_field() {
// Get the posted value of the checkbox
$checkbox_value = isset($_POST['conformation']) ? $_POST['conformation'] : '';
wc_add_notice(__('Der Versand von durchgeführten Tests aus anderen L?ndern nach Deutschland erfolgt auf die Kosten der Kundin. Der Betrag kann je nach Land abweichen.'), 'error');
}- This reply was modified 1 month, 1 week ago by nilesh6018.
Forum: Plugins
In reply to: [Quick and Easy FAQs] Make question close when opening another oneReplace above code with
$(".qe-toggle-title").click(function () { if ($('.qe-toggle-content').is(':visible')) { $(".qe-toggle-content").slideUp(100); $('.qe-toggle-title').find('i.fa').removeClass( 'fa-minus-circle' ).addClass( 'fa-plus-circle' ); } if ($(this).next(".qe-toggle-content").is(':visible')) { $(this).next(".qe-toggle-content").slideUp(100); $(this).find('i.fa').removeClass( 'fa-minus-circle' ).addClass( 'fa-plus-circle' ); } else { $(this).next(".qe-toggle-content").slideDown(100); $(this).find('i.fa').removeClass('fa-plus-circle').addClass('fa-minus-circle'); } });
- This reply was modified 7 years, 5 months ago by nilesh6018.
- This reply was modified 7 years, 5 months ago by nilesh6018.
- This reply was modified 7 years, 5 months ago by nilesh6018.
Viewing 3 replies - 1 through 3 (of 3 total)