Muhammad Usama Masood
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Stripe Payment Gateway] Accepting only 3D Secure paymentsHello @miike,
wc_gateway_stripe_process_payment
action hook called after payment is processed, so we need to handle this differently.First, we can capture payment false if payment isn’t 3D secure, then we can failed this order.
add_action( 'wc_gateway_stripe_process_response', 'prefix_wc_gateway_stripe_process_response', 20, 2 ); function prefix_wc_gateway_stripe_process_response( $response, $order ){ if($response->source->type == 'three_d_secure'){ $order->update_status('completed', 'order_note'); #### }elseif($response->source->type == 'card'){ $order->update_status('failed', 'order_note'); #### } }
add_filter('wc_stripe_generate_payment_request', 'prefix_wc_stripe_generate_payment_request', 20, 3); function prefix_wc_stripe_generate_payment_request($post_data, $order, $prepared_source){ if($response->source_object->type != 'three_d_secure'){ $post_data['capture'] = 'false'; } return $post_data; }
- This reply was modified 6 years, 5 months ago by Muhammad Usama Masood.
Forum: Plugins
In reply to: [WooCommerce Weight Based Shipping] Export and Import Shipping DataI have export and import data from WordPress option table.
Hello TobiasBg,
Hope you are good in health. I am facing same issue with TablePress and Membership 2 plugin, As I have added the Membership login widget in footer area and they are basically dequeue all scripts and enqueue it again with their login form. https://screencast.com/t/cdeb5jZjSRUY
But somehow TablePress enqeue the datatable initialization code again in footer on wp_footer(). https://screencast.com/t/KIuJbF3fPl
If we remove the wp_footer() from footer then issue solve which is risky to remove the wp_footer() from footer. Please suggest solution for this.
Thanks.
Forum: Themes and Templates
In reply to: [Hueman] Remove the post date of the blogsForum: Plugins
In reply to: [Accordion Shortcodes] auto-open option?I do accordingly but it not working to show first.
Forum: Plugins
In reply to: [PrestaShop Integration] Problem with Prestashop 1.6Any update about issue ? as I am going to integrate PrestaShop 1.6 with WordPress.
So Please let me know is the issue solved ?
Thanks pupunzi,
The plugin download functionality working perfectly good. Thanks for help and updated code. Kindly also update in to new plugin version.Forum: Plugins
In reply to: [SI CAPTCHA Anti-Spam] Show SI CAPTCHA below comment textareaThanks, I find the solution.
Si Captcha add captcha field after filter (comment_form_default_fields) in the comment form.I have made change in comment.php file in theme folder.
comment_form();
replace this with<?php $comment_args = array( 'comment_field' => '', 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>', 'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>', 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p><br>', )), ); comment_form($comment_args); ?>
Forum: Plugins
In reply to: [SI CAPTCHA Anti-Spam] Show SI CAPTCHA below comment textareaThanks, I find the solution.
Si Captcha add captcha field after filter (comment_form_default_fields) in the comment form.I have made change in comment.php file in theme folder.
comment_form();
replace this with<?php $comment_args = array( 'comment_field' => '', 'fields' => apply_filters( 'comment_form_default_fields', array( 'author' => '<p class="comment-form-author">' . '<label for="author">' . __( 'Name' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . '<input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="30"' . $aria_req . ' /></p>', 'email' => '<p class="comment-form-email"><label for="email">' . __( 'Email' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label> ' . '<input id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="30"' . $aria_req . ' /></p>', 'url' => '<p class="comment-form-url"><label for="url">' . __( 'Website' ) . '</label>' . '<input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="30" /></p>', 'comment_field' => '<p class="comment-form-comment"><label for="comment">' . _x( 'Comment', 'noun' ) . '</label><textarea id="comment" name="comment" cols="45" rows="8" aria-required="true"></textarea></p><br>', )), ); comment_form($comment_args); ?>
Forum: Plugins
In reply to: [Easy Timer] [Plugin: Easy Timer] Custom fields and Default time?Can the expiration date be inserted from custom field now?