Set the Language for Google reCAPTCHA

/** * Set the language reCAPTCHA * * @link https://wpforms.com/developers/how-to-set-the-language-for-google-recaptcha/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_recaptcha_language( $url ) { // Set the language code to FR (French) // To find your language code, please visit https://developers.google.com/recaptcha/docs/language…Continue reading

Position the Field Description Above the Form Field

/** * Move the field description above the form field * * @link https://wpforms.com/developers/how-to-position-the-field-description-above-the-form-field/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_field_properties( $properties, $field, $form_data ) { // Only process this snippet on form ID 999999 // To…Continue reading

Change the sold by link label to vendor’s name

if ( ! function_exists( ‘display_solby_as_first_name’ ) ) { /** * Display sold by as vendor first name. * * @param string $soldby the link with name. * @param int $vendor_id the Vendor ID. */ function display_solby_as_first_name( $soldby, $vendor_id ) {…Continue reading

Change label of CSV header, and removing others(Export Totals to CSV)

add_filter( ‘wcv_commissions_sum_export_columns’, ‘wcv_change_commissions_sum_export_columns’, 10, 1 ); function wcv_change_commissions_sum_export_columns( $desciption_args ) { $add_args = array( ‘bank_routing’ => __( ‘BSB’, ‘wc-vendors’ ), ); // Remove iban and swift column. unset( $desciption_args[‘bank_iban’] ); unset( $desciption_args[‘bank_swift’] ); $desciption_args = array_merge( $desciption_args, $add_args ); return…Continue reading

Add vat over the commission

// Add 16% VAT to vendor commission add_filter( ‘wcv_process_commission’, ‘my_wcv_commission_rate’, 10, 5 ); add_filter( ‘wcv_commission_rate’, ‘my_wcv_commission_rate’, 10, 5 ); function my_wcv_commission_rate( $commission, $product_id, $product_price, $order, $qty ) { $vat_fee = 0.16; $marketplace_split = $product_price – $commission; $vat = $marketplace_split *…Continue reading

Remove JQuery Migrate Script

function remove_jquery_migrate($scripts) { if (!is_admin() && isset($scripts->registered[‘jquery’])) { $script = $scripts->registered[‘jquery’]; if ($script->deps) { // Check whether the script has any dependencies $script->deps = array_diff($script->deps, array(‘jquery-migrate’)); } } } add_action(‘wp_default_scripts’, ‘remove_jquery_migrate’);Continue reading

Disable Enter Key in WPForms

/** * Disable the Enter key for WPForms forms * * @link https://wpforms.com/developers/how-to-stop-the-enter-key-from-submitting-the-form/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_disable_enter_all_wpforms( ) { ?>Continue reading

admin – function – Allow SVG Files Upload

/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading