diff --git a/.changelogs/fix_add-purchase-link-to-access-plan.yml b/.changelogs/fix_add-purchase-link-to-access-plan.yml new file mode 100644 index 0000000000..b811e67200 --- /dev/null +++ b/.changelogs/fix_add-purchase-link-to-access-plan.yml @@ -0,0 +1,5 @@ +significance: patch +type: changed +links: + - "#2793" +entry: Adding purchase checkout link to the access plan header as an icon. diff --git a/includes/admin/views/access-plans/access-plan.php b/includes/admin/views/access-plans/access-plan.php index 7396d1b178..262b31ba3c 100644 --- a/includes/admin/views/access-plans/access-plan.php +++ b/includes/admin/views/access-plans/access-plan.php @@ -41,6 +41,10 @@ $on_sale = $plan->get( 'on_sale' ); $availability = $plan->get( 'availability' ); $checkout_redirect_url = $plan->get( 'checkout_redirect_url' ); + $checkout_url = $plan->get_checkout_url( false ); + if ( false === strpos( $checkout_url, home_url() ) ) { + $checkout_url = home_url( $checkout_url ); + } } ?> @@ -65,6 +69,9 @@ + + + @@ -88,7 +95,7 @@

- +