• Resolved Laurent-ma

    (@laurent-ma)


    Hi,

    What is the new version if this class

    WC_Stripe_Apple_Pay

    I need to update this code :

    remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_button' ), 1 );
    remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_separator_html' ), 2 );
    
    /*
     * Adds Apple Pay button on the checkout page, below customers details, and inverse button/separator order.
     */
    add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_separator_html' ), 1 );
    add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_button' ), 2 );

    Thank You,
    Laurent

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor royho

    (@royho)

    You can try replacing WC_Stripe_Apple_Pay with WC_Stripe_Payment_Request

    Thread Starter Laurent-ma

    (@laurent-ma)

    Unfortunately, it’s doesn’t works !

    I have a beautiful blank Page …

    Plugin Contributor royho

    (@royho)

    Please show your full code.

    Thread Starter Laurent-ma

    (@laurent-ma)

    /*
     * Removes Apple Pay button on the checkout page.
     */
    remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_button' ), 1 );
    remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_separator_html' ), 2 );
    /*
     * Adds Apple Pay button on the checkout page, below customers details, and inverse button/separator order.
     */
    add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_separator_html' ), 1 );
    add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Apple_Pay::instance(), 'display_apple_pay_button' ), 2 );
    

    This code was use with stripe 3 to move te Apple Pay button under the customers details

    Plugin Contributor royho

    (@royho)

    I mean show the full code you used that didn’t work.

    Thread Starter Laurent-ma

    (@laurent-ma)

    Oups ! sorry

    
    /*
     * Removes Apple Pay button on the checkout page.
     */
    remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_apple_pay_button' ), 1 );
    remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_apple_pay_separator_html' ), 2 );
    /*
     * Adds Apple Pay button on the checkout page, below customers details, and inverse button/separator order.
     */
    add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_apple_pay_separator_html' ), 1 );
    add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_apple_pay_button' ), 2 );
    
    Plugin Contributor royho

    (@royho)

    Ok try this:

    /*
     * Removes Apple Pay button on the checkout page.
     */
    remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 1 );
    remove_action( 'woocommerce_checkout_before_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 2 );
    /*
     * Adds Apple Pay button on the checkout page, below customers details, and inverse button/separator order.
     */
    add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_separator_html' ), 1 );
    add_action( 'woocommerce_checkout_after_customer_details', array( WC_Stripe_Payment_Request::instance(), 'display_payment_request_button_html' ), 2 );
    Thread Starter Laurent-ma

    (@laurent-ma)

    No, I have a blank page

    Plugin Contributor royho

    (@royho)

    I am not seeing any issues here. Perhaps copy and paste in wrong location? Did you check your error logs to see what it is telling you?

    Plugin Contributor royho

    (@royho)

    And just to make sure, are you using the latest Stripe version? If not try that.

    Thread Starter Laurent-ma

    (@laurent-ma)

    Hi,

    I was in stripe 4.05 I just update and now it’s works fine ??

    Thank you very much for your help

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Class WC_Stripe_Apple_Pay’ is closed to new replies.