This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * | |
| * Plugin Name: WooCommerce Enable Reviews - Bulk Edit | |
| * Description: Allow enable reviews by bulk edit into WooCommerce | |
| * Version: 1.0.0 | |
| * Author: Mário Valney | |
| * Author URI: http://mariovalney.com | |
| * Text Domain: woo-enable-reviews-bulk-edit | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Email validation by third-party API | |
| // The following example shows how you can send the value of an Email type field to a third-party API to determine if the email is valid. In this example we are using the QuickEmailVerification API. | |
| add_filter( 'gform_field_validation', function ( $result, $value, $form, $field ) { | |
| if ( $field->get_input_type() === 'email' && $result['is_valid'] ) { | |
| $request_url = add_query_arg( | |
| array( | |
| 'email' => $value, | |
| 'apikey' => 'your_api_key_here', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getLogoutUrl($redirectUrl = ''){ | |
| if(!$redirectUrl) $redirectUrl = site_url(); | |
| $return = str_replace("&", '&', wp_logout_url($redirectUrl)); | |
| return $return; | |
| } | |
| /** | |
| * Bypass logout confirmation on nonce verification failure | |
| */ | |
| function logout_without_confirmation($action, $result){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form name="myform" method="GET" action="<?php echo esc_url(home_url('/'));?>"> | |
| <?php if (class_exists('WooCommerce')): ?> | |
| <?php | |
| if (isset($_REQUEST['product_cat']) && !empty($_REQUEST['product_cat'])) { | |
| $optsetlect = $_REQUEST['product_cat']; | |
| } else { | |
| $optsetlect = 0; | |
| } | |
| $args = array( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| gform.addAction( 'gform_input_change', function( elem, formId, fieldId ) { | |
| if ( fieldId == 13 ) { | |
| valorCampoDate = elem.value; | |
| var parts = valorCampoDate.split( '/' ); | |
| // Presta atención al mes ( parts[1] ); JavaScript cuenta los meses desde 0: | |
| // Enero - 0, Febrero - 1, etc. | |
| var myDate = new Date( parts[2], parts[1] - 1, parts[0] ); | |
| // Cambiar el valor del campo oculto. |
OlderNewer