Shreyas Khatri
Fils de soutien créés au cours des 30 derniers jours : 0
Sujets de forum favoris
Cet utilisateur n'a aucun sujet favori.
Sujets de forum créés
Status | Sujet | Supporter | Voix | Publications | Nouveauté |
---|---|---|---|---|---|
Show Variation Product on WooCommerce shop and other archive pages
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
2 | 6 | Il y a 2 années et 10 mois | ||
Query only posts that have relationship items assigned in many to many relation
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
2 | 4 | Il y a 3 années | ||
Exclude specific category while include some via shortcode parameter
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
2 | 3 | Il y a 4 années et 8 mois | ||
User Field Group not appearing on user edit field
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
2 | 2 | Il y a 4 années et 9 mois | ||
OceanWP’s Custom Footer not loading on CPT single rendered by Content Template
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
2 | 2 | Il y a 5 années | ||
Preview user created via CRED user form while the payment status is pending
Commencé par : Shreyas Khatri
dans : Toolset Professional Support
Problem: I would like to use a CRED Commerce form to create Users. While payment is pending, I would like to be able to show a preview of the User on my site, but I cannot use Views to display the User yet. How can I show a preview of the pending User account? Solution: You cannot access a pending User's account information, because that information does not exist in an accessible way in the database. Instead, you could use the CRED API to insert a temporary post using the information gathered by your CRED Commerce form. Then use that temporary post as a placeholder for your pending User. Relevant Documentation: |
2 | 5 | Il y a 6 années et 3 mois | ||
Pass CRED Fields / First Name to WooCommerce Billing_First_Name
Commencé par : Shreyas Khatri
dans : Toolset Professional Support
Problem: I am using CRED Commerce to create new Users. I would like to capture the User's first name, last name, address, and email address in the CRED User form, then pre-populate the checkout fields with that information. Solution: This will require custom code using the CRED Commerce API cred_commerce_form_action: yoursite.com/checkout?first=John&last=Smith&address=123&email=abc Then in your filter, you can access those variables from the $_GET superglobal. Here's a very simple example: add_action('cred_commerce_form_action', 'my_commerce_form_action',10,4); function my_commerce_form_action( $action, $form_id, $post_id, $form_data ) { if ($form_id == 1234) { // uncomment next line to inspect the entire post object using server logs. // error_log(print_r($_POST, true)); $first = $_POST['first_name']; // ... // get the 3 other parameters from the POST object and add them here // ... wp_redirect( '/checkout?first=' . $first); // add all 4 parameters to the URL string here exit(); } } Then in your woocommerce_checkout-fields filter, you should be able to access the URL parameters in the $_GET superglobal: add_filter( 'woocommerce_checkout_fields' , 'kia_checkout_field_defaults', 20 ); function kia_checkout_field_defaults( $fields ) { $first_name = isset($_GET['first']) ? $_GET['first'] : ''; $fields['billing']['billing_first_name']['placeholder'] = 'First Name'; $fields['billing']['billing_first_name']['default'] = $first_name; return $fields; } I'm not able to provide support for the woocommerce_checkout_fields API, because it is not part of our software. You should consult the WooCommerce documentation for more information there. Relevant Documentation: https://toolset.com/documentation/programmer-reference/cred-commerce-api/#cred_commerce_form_action https://docs.woocommerce.com/document/checkout-field-editor/ |
3 | 6 | Il y a 6 années et 4 mois | ||
Pass CRED Fields and Custom User Fields Data to WooCommerce Checkout
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
3 | 3 | Il y a 6 années et 5 mois | ||
Filter posts by custom date field greater than equal to today
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
2 | 4 | Il y a 6 années et 8 mois | ||
Infinite scrolling replaces first 10 posts but thereafter works properly
Commencé par : Shreyas Khatri
dans : Toolset Professional Support
Problem: Views that use infinite scrolling do not seem to update correctly. Instead of appending to the first set of results, the first set is replaced. Then results are appended as expected. Solution: It appears in this case that Cloudflare HTML Minification conflicts with Infinite Scrolling. Once disabled, Views begin to update as expected. |
2 | 7 | Il y a 6 années et 9 mois | ||
Set min-date for end date greater start-end selection
Commencé par : Shreyas Khatri
dans : Toolset Professional Support
Problem: I would like to set a minimum end date for my range datepicker based on the value selected for the start date. Users should not be able to select an end date before the start date. Solution: Add some JavaScript that will set datepicker options using the 'onClose' datepicker option: jQuery(document).ready(function () { var toolset_date_range_handler = function(date, datepicker) { jQuery('.js-wpv-date-front-end-event-end-date-and-time').datepicker('option', 'minDate', date); }; jQuery('.js-wpv-date-front-end-event-start-date-and-time').datepicker('option', 'onClose', toolset_date_range_handler); }); Relevant Documentation: http://api.jqueryui.com/datepicker/#option-onClose |
2 | 3 | Il y a 6 années et 9 mois | ||
Filter archive view using cookies
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
2 | 2 | Il y a 6 années et 10 mois | ||
Infinite Scroll replaces the first page of pagination instead of scrolling
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
2 | 4 | Il y a 6 années et 11 mois | ||
Previous and Next Post Navigation when sorted by menu order
Commencé par : Shreyas Khatri
dans : Toolset Professional Support
Problem: < Previous : Post Name | Post Name : Next > Solution: 1. For this you should create custom shortcodes. Please add this code in your theme’s or child theme’s functions.php file: add_shortcode( 'next_post', 'next_shortcode' ); function next_shortcode($atts) { global $post; ob_start(); next_post_link( '<span class="nav-next">%link : Next ></span>', '%title' ); $result = ob_get_contents(); ob_end_clean(); return $result; } add_shortcode( 'prev_post', 'prev_shortcode' ); function prev_shortcode($atts) { global $post; ob_start(); previous_post_link( '<span class="nav-previous">< Previous : %link</span>', '%title' ); $result = ob_get_contents(); ob_end_clean(); return $result; } // Customize Post Link Order function my_custom_adjacent_post_where($sql) { if ( !is_main_query() || !is_singular() || 'playground' != get_post_type() ) return $sql; $the_post = get_post( get_the_ID() ); $patterns = array(); $patterns[] = '/post_date/'; $patterns[] = '/\'[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}\'/'; $replacements = array(); $replacements[] = 'menu_order'; $replacements[] = $the_post->menu_order; return preg_replace( $patterns, $replacements, $sql ); } add_filter( 'get_next_post_where', 'my_custom_adjacent_post_where' ); add_filter( 'get_previous_post_where', 'my_custom_adjacent_post_where' ); function my_custom_adjacent_post_sort($sql) { if ( !is_main_query() || !is_singular() || 'playground' != get_post_type() ) return $sql; $pattern = '/post_date/'; $replacement = 'menu_order'; return preg_replace( $pattern, $replacement, $sql ); } add_filter( 'get_next_post_sort', 'my_custom_adjacent_post_sort' ); add_filter( 'get_previous_post_sort', 'my_custom_adjacent_post_sort' ); ==> Whereas ‘playground’ is your custom post type slug, that you need to replace in the above code. 2. Then, add this shortcode in your Content Template to display Previous and Next post links: [prev_post] | [next_post] |
3 | 10 | Il y a 6 années et 11 mois | ||
Menu positions created by layouts missing after layouts update
Commencé par : Shreyas Khatri dans : Toolset Professional Support |
1 | 2 | Il y a 7 années et 2 mois |