crackcodewithamal
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Hotelier] Payment systemI can explain the situation once more, I have a room with name room 1 and Stock rooms is set to 10
and two user come to site and tried to book 10 rooms each and press the book button and for both one , room has been reserved on admin side with status pending . it’s a rare situation. but I need to handle the situation. any idea to handle the situation . I am not asking for fix. I just need to know the better way to handle the sitution,
thanks in advance and thanks for the awesome plugin once againForum: Plugins
In reply to: [WP Hotelier] Payment systemMax number of room can be booked by two user at a time. if I am having room1 with qty 10
it’s been added to cart by two user and fill the user detail form and click on the book room buttom at the same time(no delay),two of the users order are created and prompted to payment .
is this type of issue happend?Forum: Plugins
In reply to: [WP Stripe Checkout] Custom form submission to direct stripe checkoutI can add a redirect url. will it work in that case?
Sorry .It’s my mistake . Following code get worked
add_filter( 'wc_stripe_generate_payment_request', 'filter_wc_stripe_payment_descriptionmod', 3, 10 ); function filter_wc_stripe_payment_descriptionmod( $post_data, $order, $source ) { $cat_flag=0; foreach( $order->get_items() as $item_id => $line_item ) { $product = $line_item->get_product(); error_log(print_r($product, true) . "\n", 3, dirname(__FILE__) . '/stripe-product_product.log'); $product_category_ids = $product->get_category_ids(); error_log(print_r($product_category_ids, true) . "\n", 3, dirname(__FILE__) . '/stripe-product_category_ids.log'); $cat_id=17; if (in_array($cat_id, $product_category_ids)) { $cat_flag=1; break; } } if($cat_flag) { $post_data['capture'] =0; } error_log(print_r($post_data, true) . "\n", 3, dirname(__FILE__) . '/stripe-post-data.log'); error_log(print_r($order, true) . "\n", 3, dirname(__FILE__) . '/stripe-post-data_order.log'); error_log(print_r($cat_flag, true) . "\n", 3, dirname(__FILE__) . '/stripe-post-data_flag.log'); return $post_data; }
Following filter worked .
Thanksadd_filter( 'wc_stripe_generate_payment_request', 'change_cap',2,3 ); function change_cap( $post_data, $order, $prepared_source ) { $post_data['capture_method']='manual'; }
Hi I have checking on a dummy site with store front theme. I have been added the code on function.php but nothing happened.