Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update Certificates Explorer URL #43

Merged
merged 5 commits into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions assets/js/lib/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export const PUBLIC_SCOREDETECT_URL = 'https://www.scoredetect.com';

export const PUBLIC_CERTIFICATES_EXPLORER_URL = 'https://explorer.scoredetect.com';

export const PUBLIC_API_URL = 'https://api.scoredetect.com';

export const PUBLIC_SUPABASE_URL = 'https://jtiipfmpqosvwdjjbhnc.supabase.co';
Expand Down
6 changes: 3 additions & 3 deletions assets/js/timestamps-screenshot-shortcode/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import QRCode from 'easyqrcodejs'; // eslint-disable-line import/no-extraneous-d
/**
* Internal dependencies.
*/
import { PUBLIC_SCOREDETECT_URL } from '../lib/constants';
import { PUBLIC_CERTIFICATES_EXPLORER_URL } from '../lib/constants';

/**
* Displays a HUD with the certificate ID and a QR code.
Expand Down Expand Up @@ -61,7 +61,7 @@ function displayHud({ certificateId = '' }) {

document.getElementById(qrCodeId).style.display = 'none';

const publicLedgerUrl = `${PUBLIC_SCOREDETECT_URL}/certificate/${certificateId}`;
const publicLedgerUrl = `${PUBLIC_CERTIFICATES_EXPLORER_URL}/certificate/${certificateId}`;

// Create QR Code Object.
const qrcode = new QRCode(document.getElementById(qrCodeId), {
Expand Down Expand Up @@ -234,7 +234,7 @@ function handleScreenshot({ body, btn, certificateId }) {
const certificateId = certificate.id;
const filename = `${__('certificate', 'timestamps')}-${certificateId}.pdf`;
const docTitle = __('Verification Certificate', 'timestamps');
const publicLedgerUrl = `${PUBLIC_SCOREDETECT_URL}/certificate/${certificateId}`;
const publicLedgerUrl = `${PUBLIC_CERTIFICATES_EXPLORER_URL}/certificate/${certificateId}`;

const doc = new jsPDF(); // eslint-disable-line new-cap

Expand Down
4 changes: 2 additions & 2 deletions includes/classes/Feature/WooCommerce/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function order_timestamps_column( $column_name, $order_or_order_id ) {

printf(
'<a class="button-link" href="%s" target="_blank" rel="nofollow noopener noreferrer">%s</a>',
esc_url( 'https://scoredetect.com/certificate/' . $sdcom_previous_certificate_id ),
esc_url( 'https://explorer.scoredetect.com/certificate/' . $sdcom_previous_certificate_id ),
esc_html__( 'View Certificate', 'timestamps' )
);
}
Expand Down Expand Up @@ -545,7 +545,7 @@ public function timestamps_placeholder_wc_email( $_string, $email ): string {
'timestamps_placeholder_wc_email',
sprintf(
'<a class="button-link" href="%s" target="_blank" rel="nofollow noopener noreferrer">%s</a>',
esc_url( 'https://scoredetect.com/certificate/' . $sdcom_previous_certificate_id ),
esc_url( 'https://explorer.scoredetect.com/certificate/' . $sdcom_previous_certificate_id ),
esc_html__( 'View Certificate', 'timestamps' )
),
$order
Expand Down
2 changes: 1 addition & 1 deletion includes/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function get_certificate_url_wc_order( $order ): string {
return '';
}

return apply_filters( 'get_certificate_url_wc_order', esc_url( 'https://scoredetect.com/certificate/' . $sdcom_previous_certificate_id ), $order );
return apply_filters( 'get_certificate_url_wc_order', esc_url( 'https://explorer.scoredetect.com/certificate/' . $sdcom_previous_certificate_id ), $order );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The API Documentation is available here: https://docs.scoredetect.com/
We are transparent - here are our Terms and Conditions: https://www.scoredetect.com/terms-and-conditions
We value privacy - here is our Privacy Policy: https://www.scoredetect.com/privacy-policy

Example Verification Certificate: https://www.scoredetect.com/certificate/99f8b221-ff5c-4bea-b39a-a63b99880837
Example Verification Certificate: https://explorer.scoredetect.com/certificate/3ccfc7fd-bf8a-44c8-b2a3-3b3bd09a24b8

== Installation ==
1. First, you will need to properly install the Timestamps plugin.
Expand Down
Loading