Skip to content

Commit

Permalink
Update shortcode prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Oct 6, 2024
1 parent 71d8163 commit a975f92
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion InvoiceNinja/WordPress/PostApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,9 @@ public function clientPortalShortcode($atts)
$url = rtrim( $url, '/' );
$url = rtrim( $url, 'api/v1' );
$url = rtrim( $url, '/' );
if (! $url) {
$url = 'https://invoicing.co';
}
$url .= '/client/key_login/' . $contact->contact_key;
if ($atts['sso'] == 'true') {
$url .= '?client_hash=' . $client->client_hash;
Expand All @@ -419,7 +422,7 @@ public function clientPortalShortcode($atts)
?>
<form method="post" action="">
<?php wp_nonce_field('invoiceninja_client_portal', 'invoiceninja_nonce'); ?>
<button type="submit"><?php echo esc_attr( $atts['label'] ) ?></button>
<button type="submit" name="invoiceninja_client_portal"><?php echo esc_attr( $atts['label'] ) ?></button>
</form>
<?php

Expand Down

0 comments on commit a975f92

Please sign in to comment.