eolis
Forum Replies Created
-
the new section-22 code causes a blank white screen when enabled. perhaps it needs a check that woo is initiated before running?
remove_action( ‘woocommerce_proceed_to_checkout’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_html’ ), 1 );
remove_action( ‘woocommerce_proceed_to_checkout’, array( WC_Stripe_Payment_Request::instance(), ‘display_payment_request_button_separator_html’ ), 2 );either way I cannot test these actions as they crash the page. (code from: https://docs.woocommerce.com/document/stripe/#section-22)
I guess before getting into this I should just ask: is there a way to add apple pay as a normal payment method? Optimally I would just have another payment method for apple pay appear beside paypal and credit cards in the regular Stripe checkout methods. I am sure others would appreciate the option as well; though it is understandable with apple integration and fingerprint ID jazz that it is separated from regular methods.
Continuing on: I need to remove the action on the checkout page and add it back at a different location (users need to fill out checkout details, as it affects the final order price: VAT exemption, tax rate edits, etc.). Having it at the top away from other payment methods means users will frequently skip filling out regular checkout information which adjusts the final price.
https://www.remicorson.com/woocommerce-apple-pay-move-buttons-below-customer-details/
This article looks promising and like the code should actually do something; but it sadly is not. I cannot seem to move the button to the action I desire which would be:
woocommerce_review_order_before_paymentis there something I am missing? I used:
add_filter( ‘wc_stripe_show_payment_request_on_checkout’, ‘__return_true’, 97 );
to add the form to checkout, then I used:// remove current instance of apple pay button
remove_action( ‘woocommerce_checkout_before_customer_details’, array( WC_Stripe_Apple_Pay::instance(), ‘display_apple_pay_button’ ), 95 );
remove_action( ‘woocommerce_checkout_before_customer_details’, array( WC_Stripe_Apple_Pay::instance(), ‘display_apple_pay_separator_html’ ), 96 );// Add Actions Back at desired location
add_action( ‘woocommerce_review_order_before_payment’, array( WC_Stripe_Apple_Pay::instance(), ‘display_apple_pay_button’ ), 98 );
add_action( ‘woocommerce_review_order_before_payment’, array( WC_Stripe_Apple_Pay::instance(), ‘display_apple_pay_separator_html’ ), 99 );which should de-register the rendered form, and inject it at the desired location. I just get it appearing at the same place; so it is as if nothing happened.
add_filter( ‘wc_stripe_hide_payment_request_on_product_page’, ‘__return_true’ );
this filter does not disable the payment button on cart page, despite the docs saying it does (https://docs.woocommerce.com/document/stripe/#section-21). I used CSS to just hide it on my cart page but it’s pretty annoying there is no hook to disable on cart page. it does work to remove on product pages.
Forum: Plugins
In reply to: [WooCommerce] Custom Checkout Fieldsty ty. Ill look at the other hooks I can play with
Forum: Plugins
In reply to: [WooCommerce] Custom Checkout FieldsHi there, as this is the only place I have found this code working I thought I would ask. this adds the fields to me email; now how would one specify where in the email?
EX:
add_filter('woocommerce_email_order_meta_fields', 'abu_add_checkout_field_order_meta_fields', 10, 3 ); function abu_add_checkout_field_order_meta_fields( $fields, $sent_to_admin, $order ) { // ********* These Two I want after the billing_last_name $fields['_billing_last_name_2'] = array( 'label' => __( '姓(カナ)' ), 'value' => get_post_meta( $order->id, '_billing_last_name_2', true ), ); $fields['_billing_first_name_2'] = array( 'label' => __( '名(カナ)' ), 'value' => get_post_meta( $order->id, '_billing_first_name_2', true ), ); // ********These Two I want after the shipping_last_name $fields['_shipping_last_name_2'] = array( 'label' => __( '姓(カナ)' ), 'value' => get_post_meta( $order->id, '_shipping_last_name_2', true ), ); $fields['_shipping_first_name_2'] = array( 'label' => __( '名(カナ)' ), 'value' => get_post_meta( $order->id, '_shipping_first_name_2', true ), ); // ******This one I want the billing_state or wherever, after one is done I am sure I can figure the others $fields['_billing_city_address_number'] = array( 'label' => __( '市区町村?番地' ), 'value' => get_post_meta( $order->id, '_billing_city_address_number', true ), ); $fields['_shipping_city_address_number'] = array( 'label' => __( '市区町村?番地' ), 'value' => get_post_meta( $order->id, '_shipping_city_address_number', true ), ); return $fields; }
Is there a way to add in the position in this function or will another be required to inject them at specific points?
Hey there Stephen Zuniga! your a bit overconfident as Ive documented this error in a lot of themes. It isn’t working, luckily people can just plug in this little bit of css (that some silly developer seems to have failed to use) into a overwrite file and it works great!
CSS::
div.payment_box_payment_method_stripe div.stripe_new_card {
display: block!important;
}now if only someone would put that in somewhere…you know…useful
??