Shreyas Khatri
In den letzten 30 Tagen erstellte Support-Threads: 0
Lieblings-Forenthemen
Dieser Benutzer hat keine Lieblingsthemen.
Forum Topics Created
Status | Thema | Supporter | Stimmen | Artikel | Aktualität |
---|---|---|---|---|---|
Show Variation Product on WooCommerce shop and other archive pages
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
2 | 6 | vor 2 Jahre, 10 Monate | ||
Query only posts that have relationship items assigned in many to many relation
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
2 | 4 | vor 3 Jahre | ||
Exclude specific category while include some via shortcode parameter
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
2 | 3 | vor 4 Jahre, 8 Monate | ||
User Field Group not appearing on user edit field
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
2 | 2 | vor 4 Jahre, 10 Monate | ||
OceanWP’s Custom Footer not loading on CPT single rendered by Content Template
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
2 | 2 | vor 5 Jahre | ||
Preview user created via CRED user form while the payment status is pending
Gestartet von: Shreyas Khatri
in: 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 | vor 6 Jahre, 3 Monate | ||
Pass CRED Fields / First Name to WooCommerce Billing_First_Name
Gestartet von: Shreyas Khatri
in: 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 | vor 6 Jahre, 4 Monate | ||
Pass CRED Fields and Custom User Fields Data to WooCommerce Checkout
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
3 | 3 | vor 6 Jahre, 5 Monate | ||
Filter posts by custom date field greater than equal to today
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
2 | 4 | vor 6 Jahre, 8 Monate | ||
Infinite scrolling replaces first 10 posts but thereafter works properly
Gestartet von: Shreyas Khatri
in: 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 | vor 6 Jahre, 9 Monate | ||
Set min-date for end date greater start-end selection
Gestartet von: Shreyas Khatri
in: 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 | vor 6 Jahre, 9 Monate | ||
Filter archive view using cookies
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
2 | 2 | vor 6 Jahre, 10 Monate | ||
Infinite Scroll replaces the first page of pagination instead of scrolling
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
2 | 4 | vor 6 Jahre, 11 Monate | ||
Previous and Next Post Navigation when sorted by menu order
Gestartet von: Shreyas Khatri
in: 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 | vor 6 Jahre, 11 Monate | ||
Menu positions created by layouts missing after layouts update
Gestartet von: Shreyas Khatri in: Toolset Professional Support |
1 | 2 | vor 7 Jahre, 2 Monate |