<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Email template for notifying about a new order pending approval.
 *
 * @package ApproveOrdersForWooCommerce
 */

do_action( 'woocommerce_email_header', $email_heading, $email );
?>

<p>
	<?php
		printf(
			/* translators: %s: order number */
			esc_html__( 'A new order #%s is pending your approval.', 'approve-orders' ),
			esc_html( $order->get_order_number() )
		);
		?>
</p>

<p>
	<?php esc_html_e( 'Please review the order details and approve or reject it as necessary.', 'approve-orders' ); ?>
</p>

<p>
	<a
		href="<?php echo esc_url( admin_url( 'post.php?post=' . $order->get_id() . '&action=edit' ) ); ?>"
		style="
			display: inline-block;
			background-color: #7f54b3;
			color: #ffffff;
			padding: 10px 20px;
			text-decoration: none;
			border-radius: 5px;
			font-weight: bold;
		"
	>
		<?php esc_html_e( 'Review & Approve Order', 'approve-orders' ); ?>
	</a>
</p>

<hr style="margin: 2em 0;">

<?php
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );

do_action( 'woocommerce_email_footer', $email );