Shreyas Khatri
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Need to modify quantity of the product that is being added via commerce form
Started by: Shreyas Khatri in: Toolset Professional Support |
2 | 3 | 6 months, 3 weeks ago | ||
Show Variation Product on WooCommerce shop and other archive pages
Started by: Shreyas Khatri in: Toolset Professional Support |
2 | 6 | 3 years, 5 months ago | ||
Query only posts that have relationship items assigned in many to many relation
Started by: Shreyas Khatri in: Toolset Professional Support |
2 | 4 | 3 years, 7 months ago | ||
Exclude specific category while include some via shortcode parameter
Started by: Shreyas Khatri in: Toolset Professional Support |
2 | 3 | 5 years, 3 months ago | ||
User Field Group not appearing on user edit field
Started by: Shreyas Khatri in: Toolset Professional Support |
2 | 2 | 5 years, 4 months ago | ||
OceanWP’s Custom Footer not loading on CPT single rendered by Content Template
Started by: Shreyas Khatri in: Toolset Professional Support |
2 | 2 | 5 years, 7 months ago | ||
Preview user created via CRED user form while the payment status is pending
Started by: 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 | 6 years, 10 months ago | ||
Pass CRED Fields / First Name to WooCommerce Billing_First_Name
Started by: 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 | 6 years, 11 months ago | ||
Pass CRED Fields and Custom User Fields Data to WooCommerce Checkout
Started by: Shreyas Khatri in: Toolset Professional Support |
3 | 3 | 7 years ago | ||
Filter posts by custom date field greater than equal to today
Started by: Shreyas Khatri in: Toolset Professional Support |
2 | 4 | 7 years, 3 months ago |