form-grant-access.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /**
  3. * Auth form grant access
  4. *
  5. * This template can be overridden by copying it to yourtheme/woocommerce/auth/form-grant-access.php.
  6. *
  7. * HOWEVER, on occasion WooCommerce will need to update template files and you
  8. * (the theme developer) will need to copy the new files to your theme to
  9. * maintain compatibility. We try to do this as little as possible, but it does
  10. * happen. When this occurs the version of the template file will be bumped and
  11. * the readme will list any important changes.
  12. *
  13. * @see https://docs.woocommerce.com/document/template-structure/
  14. * @author WooThemes
  15. * @package WooCommerce/Templates/Auth
  16. * @version 2.4.0
  17. */
  18. if ( ! defined( 'ABSPATH' ) ) {
  19. exit;
  20. }
  21. ?>
  22. <?php do_action( 'woocommerce_auth_page_header' ); ?>
  23. <h1><?php printf( __( '%s would like to connect to your store', 'woocommerce' ), esc_html( $app_name ) ); ?></h1>
  24. <?php wc_print_notices(); ?>
  25. <p><?php printf( __( 'This will give "%1$s" %2$s access which will allow it to:', 'woocommerce' ), '<strong>' . esc_html( $app_name ) . '</strong>', '<strong>' . esc_html( $scope ) . '</strong>' ); ?></p>
  26. <ul class="wc-auth-permissions">
  27. <?php foreach ( $permissions as $permission ) : ?>
  28. <li><?php echo esc_html( $permission ); ?></li>
  29. <?php endforeach; ?>
  30. </ul>
  31. <div class="wc-auth-logged-in-as">
  32. <?php echo get_avatar( $user->ID, 70 ); ?>
  33. <p><?php printf( __( 'Logged in as %s', 'woocommerce' ), esc_html( $user->display_name ) ); ?> <a href="<?php echo esc_url( $logout_url ); ?>" class="wc-auth-logout"><?php _e( 'Logout', 'woocommerce' ); ?></a>
  34. </div>
  35. <p class="wc-auth-actions">
  36. <a href="<?php echo esc_url( $granted_url ); ?>" class="button button-primary wc-auth-approve"><?php _e( 'Approve', 'woocommerce' ); ?></a>
  37. <a href="<?php echo esc_url( $return_url ); ?>" class="button wc-auth-deny"><?php _e( 'Deny', 'woocommerce' ); ?></a>
  38. </p>
  39. <?php do_action( 'woocommerce_auth_page_footer' ); ?>