Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. add_filter('woocommerce_amazon_pa_checkout_message',function(){
  2. return "Change the amazon message";
  3. });
  4.  
  5.  
  6. add_action( 'wfacp_after_checkout_page_found', 'move_down_angel_eyes_button' );
  7. add_action( 'wfacp_internal_css', 'angel_eye_custom_css', 99 );
  8.  
  9.  
  10. function move_down_angel_eyes_button() {
  11. if ( class_exists( 'Angelleye_PayPal_Express_Checkout_Helper' ) ) {
  12. $instance = Angelleye_PayPal_Express_Checkout_Helper::instance();
  13. if ( $instance instanceof Angelleye_PayPal_Express_Checkout_Helper ) {
  14. if ( $instance->enabled == 'yes' && ( $instance->show_on_checkout == 'top' || $instance->show_on_checkout == 'both' ) ) {
  15. remove_action( 'woocommerce_before_checkout_form', array( $instance, 'checkout_message' ), 5 );
  16. add_action( 'woocommerce_before_checkout_form', array( $instance, 'checkout_message' ), 50 );
  17. }
  18. }
  19.  
  20. }
  21.  
  22.  
  23.  
  24. if ( class_exists( 'WC_Amazon_Payments_Advanced' ) && wc_apa() instanceof WC_Amazon_Payments_Advanced ) {
  25. $instanceofAmazone = wc_apa();
  26. remove_action( 'woocommerce_before_checkout_form', array( $instanceofAmazone, 'checkout_message' ), 5 );
  27. add_action( 'woocommerce_before_checkout_form', array( $instanceofAmazone, 'checkout_message' ), 49 );
  28.  
  29. }
  30.  
  31.  
  32. }
  33.  
  34. function angel_eye_custom_css() {
  35. if ( class_exists( 'Angelleye_PayPal_Express_Checkout_Helper' ) ) {
  36. echo "<style>";
  37. echo "div#paypal_box_button .woocommerce_paypal_ec_checkout_message > p.checkoutStatus{display:none}";
  38. echo "</style>";
  39. }
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement