PluginProbe
Subscriptions for WooCommerce with Stripe Recurring Payments / 2.1.0
Subscriptions for WooCommerce with Stripe Recurring Payments v2.1.0
2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.11.2 1.11.1 1.11.0 1.10.9 1.10.8 1.10.7 1.10.6 1.10.5 1.10.4 1.10.3 1.10.2 1.10.1 1.10.0 1.9.6 1.9.5 trunk 1.3.0 1.3.1 1.3.2 1.4.0 All 65 releases
← All changes | includes/Traits/Email.php +15 -6 1.11.0 → 2.1.0 View file →
@@ -1,5 +1,10 @@
1 1 <?php
2 +/**
3 + * Shared email behaviour for subscription mails.
4 + *
5 + * @package SpringDevs\Subscription\Traits
6 + */
2 7
3 8 namespace SpringDevs\Subscription\Traits;
4 9
5 10 use Exception;
@@ -125,18 +130,22 @@
125 130 // Build view subscription url & set it to mail extra data.
126 131 $view_subs_endpoint = Subscription::get_user_endpoint( 'view_subs' );
127 132 $view_subscription_url = wc_get_endpoint_url( $view_subs_endpoint, $this->subscription_id, wc_get_page_permalink( 'myaccount' ) );
128 133
134 + // Admin-facing mails link to the wp-admin details page instead of My Account.
135 + $admin_subscription_url = admin_url( 'admin.php?page=wp-subscription-details&id=' . $this->subscription_id );
136 +
129 137 return wc_get_template_html(
130 138 $path,
131 139 array_merge(
132 140 array(
133 - 'id' => $this->subscription_id,
134 - 'email_heading' => $this->get_heading(),
135 - 'product_name' => $this->product_name,
136 - 'qty' => $this->qty,
137 - 'amount' => $this->amount,
138 - 'view_subscription_url' => $view_subscription_url,
141 + 'id' => $this->subscription_id,
142 + 'email_heading' => $this->get_heading(),
143 + 'product_name' => $this->product_name,
144 + 'qty' => $this->qty,
145 + 'amount' => $this->amount,
146 + 'view_subscription_url' => $view_subscription_url,
147 + 'admin_subscription_url' => $admin_subscription_url,
139 148 ),
140 149 $this->extra
141 150 ),
142 151 'subscription',