Guest User

Untitled

a guest
Nov 22nd, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. function is_angelleye_express_checkout_used() {
  2.     if (sizeof(WC()->session) == 0) {
  3.         return false;
  4.     }
  5.     $paypal_express_checkout = WC()->session->get( 'paypal_express_checkout' );
  6.     return isset($paypal_express_checkout);
  7. }
  8. add_action('woocommerce_before_checkout_form', 'angelleye_woocommerce_before_checkout_form', 9);
  9. function angelleye_woocommerce_before_checkout_form() {
  10.     if(is_angelleye_express_checkout_used()) {
  11.         echo '<div><p>' . __('Sample text before checkout form', '') . '</p></div>';
  12.     }
  13. }
Add Comment
Please, Sign In to add comment