/** * Approve user after PayPal payment status is Complete * * @link https://wpforms.com/developers/how-to-approve-a-user-after-a-paypal-payment/ */ function wpf_dev_activate_user_after_paypal_complete( $fields, $form_data, $payment_id, $data ){ // Add the field ID for the user’s account email $email_field = 3; // Stop editing $user =…Continue reading
/** * Add fireworks to the canvas element on the confirmation message * * @link https://wpforms.com/developers/how-to-add-confetti-animation-to-confirmation-message/ */ function wpf_fireworks_animation() { ?>Continue reading
** * Add confetti to the canvas element on the confirmation message * * @link https://wpforms.com/developers/how-to-add-confetti-animation-to-confirmation-message/ */ function wpf_confetti_animation() { ?>Continue reading
/** * Populate field from anchor link. * * @link https://wpforms.com/developers/how-to-populate-a-form-field-from-an-anchor-link/ */ function wpf_dev_autofill_field() { ?>Continue reading
/** * Add address validation for Authorize.net address fields * * @link https://wpforms.com/developers/how-to-add-address-field-validation-for-authorize-net/ */ function wpf_dev_authorize_address_validation( $fields, $entry, $form_data ) { // Optional, you can limit to specific forms. Below, we restrict output to // form #1000. if ( absint(…Continue reading
/** * Disable for automated testing. * * @link https://wpforms.com/developers/how-to-disable-recaptcha-for-automated-testing/ */ // Disable reCAPTCHA assets and initialisation on the frontend. add_filter( ‘wpforms_frontend_recaptcha_disable’, ‘__return_true’ ); // Disable validation and verification on the backend. add_filter( ‘wpforms_process_bypass_captcha’, ‘__return_true’ );Continue reading
/** * Customize Rich Text Field TinyMCE buttons for top toolbar. * * @link https://wpforms.com/developers/how-to-customize-the-rich-text-field-tinymce-icons/ */ // Function to change the top toolbar function wpf_dev_customize_tinymce_buttons_toolbar1( $toolbar, $field_id, $field_data ) { $toolbar = [ ‘fontselect’, ‘fontsizeselect’, ‘forecolor’, ‘indent’, ‘outdent’, ‘italic’, ‘styleselect’,…Continue reading
/** * Restrict countries inside the Smart Phone form field * * @link https://wpforms.com/how-to-restrict-countries-inside-smart-phone-form-fields/ */ function wpf_dev_smart_phone_field_restrict_countries() { ?>Continue reading
/** * Disallow numbers in a single-line text field * * @link https://wpforms.com/developers/how-to-restrict-numbers-in-a-single-line-text-form-field/ */ function wpf_dev_disallow_numbers_text_field( $fields, $entry, $form_data ) { // Optional, you can limit to specific forms. Below, we restrict output to // form ID #1000. if (…Continue reading
add_filter( ‘woocommerce_cart_item_price’, ‘filter_cart_item_price’, 10, 3 ); function filter_cart_item_price( $price_html, $cart_item, $cart_item_key ) { if( $cart_item[‘data’]->is_on_sale() ) { return $cart_item[‘data’]->get_price_html(); } return $price_html; } add_filter( ‘woocommerce_cart_item_subtotal’, ‘filter_cart_item_subtotal’, 10, 3 ); function filter_cart_item_subtotal( $subtotal_html, $cart_item, $cart_item_key ){ $product = $cart_item[‘data’]; $quantity =…Continue reading