Changeset 3108482
- Timestamp:
- 06/27/2024 08:33:31 AM (21 months ago)
- Location:
- timestamps
- Files:
-
- 12 edited
- 1 copied
-
tags/1.4.0 (copied) (copied from timestamps/trunk)
-
tags/1.4.0/composer.json (modified) (1 diff)
-
tags/1.4.0/includes/classes/Feature/WooCommerce/Orders.php (modified) (4 diffs)
-
tags/1.4.0/package-lock.json (modified) (2 diffs)
-
tags/1.4.0/package.json (modified) (1 diff)
-
tags/1.4.0/readme.txt (modified) (1 diff)
-
tags/1.4.0/timestamps.php (modified) (3 diffs)
-
trunk/composer.json (modified) (1 diff)
-
trunk/includes/classes/Feature/WooCommerce/Orders.php (modified) (4 diffs)
-
trunk/package-lock.json (modified) (2 diffs)
-
trunk/package.json (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/timestamps.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
timestamps/tags/1.4.0/composer.json
r3074313 r3108482 12 12 ], 13 13 "require": { 14 "php": ">= 8.0"14 "php": ">=7.4" 15 15 }, 16 16 "minimum-stability": "dev", -
timestamps/tags/1.4.0/includes/classes/Feature/WooCommerce/Orders.php
r3106064 r3108482 58 58 add_action( 'woocommerce_new_order', array( $this, 'woocommerce_new_order' ) ); 59 59 add_action( 'woocommerce_update_order', array( $this, 'woocommerce_update_order' ) ); 60 add_action( 'woocommerce_before_delete_order', array( $this, 'woocommerce_before_delete_order' ), 10, 2 ); 60 61 add_filter( 'manage_woocommerce_page_wc-orders_columns', array( $this, 'add_order_timestamps_column' ), 30 ); 61 62 add_action( 'manage_woocommerce_page_wc-orders_custom_column', array( $this, 'order_timestamps_column' ), 30, 2 ); … … 244 245 error_log( 'An error occurred: ' . $e->getMessage() ); 245 246 } 247 } 248 249 /** 250 * Deletes a certificate for a WooCommerce order when the order is permanently deleted (not in trash). 251 * 252 * This does not delete the blockchain transaction. It only deletes the certificate from the API. 253 * This is because the blockchain transaction can never be deleted, as written in the smart contract. 254 * 255 * This will clear up unused certificates and help save money for you by giving more space for more certificates. 256 * 257 * We recommend visiting the certificate URL and saving to PDF / printing it, before deleting it. 258 * 259 * You can also visit https://docs.scoredetect.com/certificates/how-can-i-download-export-my-certificates to bulk export your certificates. 260 * 261 * @param int $order_id The order ID. 262 * @param \WC_Order $order The order object. 263 * @since 1.4.0 264 * @return void 265 */ 266 public function woocommerce_before_delete_order( $order_id, $order ) { 267 268 // Bail early if the order is not valid. 269 if ( ! $order instanceof \WC_Order ) { 270 return; 271 } 272 273 $sdcom_previous_certificate_id = $order->get_meta( 'sdcom_previous_certificate_id' ); 274 275 // Bail early if there is no previous certificate id. 276 if ( empty( $sdcom_previous_certificate_id ) ) { 277 return; 278 } 279 280 // Delete the certificate from the API. 281 $this->delete_certificates( [ $sdcom_previous_certificate_id ] ); 246 282 } 247 283 … … 599 635 * Retrieves old WooCommerce orders with certificates. 600 636 * 601 * @since 1. 3.0602 * @return array|object of WC_Order objects603 */ 604 public function get_old_orders_with_certificates(): array |object{637 * @since 1.4.0 638 * @return \WC_Order[] An array of old WooCommerce orders with certificates. 639 */ 640 public function get_old_orders_with_certificates(): array { 605 641 606 642 // Bail early if the WooCommerce plugin is not active. … … 646 682 * Deletes certificates from a list of certificate IDs. 647 683 * 684 * We recommend visiting the certificate URL and saving to PDF / printing it, before deleting it. 685 * 686 * You can also visit https://docs.scoredetect.com/certificates/how-can-i-download-export-my-certificates to bulk export your certificates. 687 * 648 688 * @param array $certificate_ids The certificate ids to delete. 649 689 * @since 1.3.0 -
timestamps/tags/1.4.0/package-lock.json
r3106070 r3108482 1 1 { 2 2 "name": "timestamps-plugin", 3 "version": "1. 3.1",3 "version": "1.4.0", 4 4 "lockfileVersion": 3, 5 5 "requires": true, … … 7 7 "": { 8 8 "name": "timestamps-plugin", 9 "version": "1. 3.1",9 "version": "1.4.0", 10 10 "dependencies": { 11 11 "@supabase/supabase-js": "^2.39.3", -
timestamps/tags/1.4.0/package.json
r3106070 r3108482 1 1 { 2 2 "name": "timestamps-plugin", 3 "version": "1. 3.1",3 "version": "1.4.0", 4 4 "description": "Timestamp your WordPress content to empower your content authenticity and increase user trust with our blockchain timestamping solution.", 5 5 "homepage": "https://www.scoredetect.com/", -
timestamps/tags/1.4.0/readme.txt
r3106070 r3108482 3 3 Tags: timestamp, blockchain, content, authenticity, copyright, timestamps, protection, verification, proof, timestamping 4 4 Requires at least: 6.0.0 5 Tested up to: 6. 5.25 Tested up to: 6.6 6 6 Requires PHP: 7.4 7 Stable tag: 1. 3.17 Stable tag: 1.4.0 8 8 License: AGPL-3.0-only 9 9 License URI: https://spdx.org/licenses/AGPL-3.0-only.html -
timestamps/tags/1.4.0/timestamps.php
r3106070 r3108482 9 9 * 10 10 * @link https://www.scoredetect.com/ 11 * @since 1. 3.111 * @since 1.4.0 12 12 * @package SDCOM_Timestamps 13 13 * … … 15 15 * Plugin Name: Timestamps 16 16 * Description: Timestamp your WordPress content to empower your content authenticity and increase user trust. No blockchain skills needed. 17 * Version: 1. 3.117 * Version: 1.4.0 18 18 * Author: ScoreDetect.com 19 19 * Author URI: https://www.scoredetect.com/ … … 32 32 33 33 // Useful global constants. 34 define( 'SDCOM_TIMESTAMPS_VERSION', '1. 3.1' );34 define( 'SDCOM_TIMESTAMPS_VERSION', '1.4.0' ); 35 35 define( 'SDCOM_TIMESTAMPS_OPTIONS', 'sdcom_timestamps' ); 36 36 define( 'SDCOM_TIMESTAMPS_URL', plugin_dir_url( __FILE__ ) ); -
timestamps/trunk/composer.json
r3074313 r3108482 12 12 ], 13 13 "require": { 14 "php": ">= 8.0"14 "php": ">=7.4" 15 15 }, 16 16 "minimum-stability": "dev", -
timestamps/trunk/includes/classes/Feature/WooCommerce/Orders.php
r3106064 r3108482 58 58 add_action( 'woocommerce_new_order', array( $this, 'woocommerce_new_order' ) ); 59 59 add_action( 'woocommerce_update_order', array( $this, 'woocommerce_update_order' ) ); 60 add_action( 'woocommerce_before_delete_order', array( $this, 'woocommerce_before_delete_order' ), 10, 2 ); 60 61 add_filter( 'manage_woocommerce_page_wc-orders_columns', array( $this, 'add_order_timestamps_column' ), 30 ); 61 62 add_action( 'manage_woocommerce_page_wc-orders_custom_column', array( $this, 'order_timestamps_column' ), 30, 2 ); … … 244 245 error_log( 'An error occurred: ' . $e->getMessage() ); 245 246 } 247 } 248 249 /** 250 * Deletes a certificate for a WooCommerce order when the order is permanently deleted (not in trash). 251 * 252 * This does not delete the blockchain transaction. It only deletes the certificate from the API. 253 * This is because the blockchain transaction can never be deleted, as written in the smart contract. 254 * 255 * This will clear up unused certificates and help save money for you by giving more space for more certificates. 256 * 257 * We recommend visiting the certificate URL and saving to PDF / printing it, before deleting it. 258 * 259 * You can also visit https://docs.scoredetect.com/certificates/how-can-i-download-export-my-certificates to bulk export your certificates. 260 * 261 * @param int $order_id The order ID. 262 * @param \WC_Order $order The order object. 263 * @since 1.4.0 264 * @return void 265 */ 266 public function woocommerce_before_delete_order( $order_id, $order ) { 267 268 // Bail early if the order is not valid. 269 if ( ! $order instanceof \WC_Order ) { 270 return; 271 } 272 273 $sdcom_previous_certificate_id = $order->get_meta( 'sdcom_previous_certificate_id' ); 274 275 // Bail early if there is no previous certificate id. 276 if ( empty( $sdcom_previous_certificate_id ) ) { 277 return; 278 } 279 280 // Delete the certificate from the API. 281 $this->delete_certificates( [ $sdcom_previous_certificate_id ] ); 246 282 } 247 283 … … 599 635 * Retrieves old WooCommerce orders with certificates. 600 636 * 601 * @since 1. 3.0602 * @return array|object of WC_Order objects603 */ 604 public function get_old_orders_with_certificates(): array |object{637 * @since 1.4.0 638 * @return \WC_Order[] An array of old WooCommerce orders with certificates. 639 */ 640 public function get_old_orders_with_certificates(): array { 605 641 606 642 // Bail early if the WooCommerce plugin is not active. … … 646 682 * Deletes certificates from a list of certificate IDs. 647 683 * 684 * We recommend visiting the certificate URL and saving to PDF / printing it, before deleting it. 685 * 686 * You can also visit https://docs.scoredetect.com/certificates/how-can-i-download-export-my-certificates to bulk export your certificates. 687 * 648 688 * @param array $certificate_ids The certificate ids to delete. 649 689 * @since 1.3.0 -
timestamps/trunk/package-lock.json
r3106070 r3108482 1 1 { 2 2 "name": "timestamps-plugin", 3 "version": "1. 3.1",3 "version": "1.4.0", 4 4 "lockfileVersion": 3, 5 5 "requires": true, … … 7 7 "": { 8 8 "name": "timestamps-plugin", 9 "version": "1. 3.1",9 "version": "1.4.0", 10 10 "dependencies": { 11 11 "@supabase/supabase-js": "^2.39.3", -
timestamps/trunk/package.json
r3106070 r3108482 1 1 { 2 2 "name": "timestamps-plugin", 3 "version": "1. 3.1",3 "version": "1.4.0", 4 4 "description": "Timestamp your WordPress content to empower your content authenticity and increase user trust with our blockchain timestamping solution.", 5 5 "homepage": "https://www.scoredetect.com/", -
timestamps/trunk/readme.txt
r3106070 r3108482 3 3 Tags: timestamp, blockchain, content, authenticity, copyright, timestamps, protection, verification, proof, timestamping 4 4 Requires at least: 6.0.0 5 Tested up to: 6. 5.25 Tested up to: 6.6 6 6 Requires PHP: 7.4 7 Stable tag: 1. 3.17 Stable tag: 1.4.0 8 8 License: AGPL-3.0-only 9 9 License URI: https://spdx.org/licenses/AGPL-3.0-only.html -
timestamps/trunk/timestamps.php
r3106070 r3108482 9 9 * 10 10 * @link https://www.scoredetect.com/ 11 * @since 1. 3.111 * @since 1.4.0 12 12 * @package SDCOM_Timestamps 13 13 * … … 15 15 * Plugin Name: Timestamps 16 16 * Description: Timestamp your WordPress content to empower your content authenticity and increase user trust. No blockchain skills needed. 17 * Version: 1. 3.117 * Version: 1.4.0 18 18 * Author: ScoreDetect.com 19 19 * Author URI: https://www.scoredetect.com/ … … 32 32 33 33 // Useful global constants. 34 define( 'SDCOM_TIMESTAMPS_VERSION', '1. 3.1' );34 define( 'SDCOM_TIMESTAMPS_VERSION', '1.4.0' ); 35 35 define( 'SDCOM_TIMESTAMPS_OPTIONS', 'sdcom_timestamps' ); 36 36 define( 'SDCOM_TIMESTAMPS_URL', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset
for help on using the changeset viewer.