Skip to content
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [3.8.2]
- Load plugin CSS and JS only on the checkout page to improve performance.

## [3.8.1]
- Fix: Order line calculations when a cart discount is applied.

Expand Down
21 changes: 13 additions & 8 deletions altapay.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* Author URI: https://altapay.com
* Text Domain: altapay
* Domain Path: /languages
* Version: 3.8.1
* Version: 3.8.2
* Name: SDM_Altapay
* WC requires at least: 3.9.0
* WC tested up to: 9.9.4
* WC tested up to: 10.0.2
*
* @package Altapay
*/
Expand Down Expand Up @@ -41,7 +41,7 @@
}

if ( ! defined( 'ALTAPAY_PLUGIN_VERSION' ) ) {
define( 'ALTAPAY_PLUGIN_VERSION', '3.8.1' );
define( 'ALTAPAY_PLUGIN_VERSION', '3.8.2' );
}

// Include the autoloader, so we can dynamically include the rest of the classes.
Expand Down Expand Up @@ -1004,11 +1004,13 @@ function validate_checksum_altapay_callback_form() {
if ( is_page( get_option( 'altapay_payment_page' ) ) ) {
$checksum = isset( $_POST['checksum'] ) ? sanitize_text_field( wp_unslash( $_POST['checksum'] ) ) : '';

$altapay_helper = new Helpers\AltapayHelpers();
$secret = wc_get_payment_gateway_by_order( $_POST['shop_orderid'] )->secret;
if ( ! empty( $checksum ) and ! empty( $secret ) and $altapay_helper->calculateChecksum( $_POST, $secret ) !== $checksum ) {
error_log( 'checksum validation failed' );
exit;
if ( ! empty( $checksum ) ) {
$altapay_helper = new Helpers\AltapayHelpers();
$secret = wc_get_payment_gateway_by_order( $_POST['shop_orderid'] )->secret;
if ( ! empty( $secret ) and $altapay_helper->calculateChecksum( $_POST, $secret ) !== $checksum ) {
error_log( 'checksum validation failed' );
exit;
}
}
}
}
Expand Down Expand Up @@ -1078,6 +1080,9 @@ function altapay_add_custom_class_to_body( $classes ) {
* @return void
*/
function altapay_checkout_blocks_style() {
if ( ! is_checkout() && ! is_checkout_pay_page() ) {
return;
}
wp_enqueue_style(
'altapay-block-style',
plugin_dir_url( __FILE__ ) . 'assets/css/blocks.css',
Expand Down
3 changes: 3 additions & 0 deletions classes/core/ApplePay.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public function filter_apple_pay_for_non_safari_browser( $payment_methods ) {
* @return void
*/
public function altapay_load_apple_pay_script() {
if ( ! is_checkout() && ! is_checkout_pay_page() ) {
return;
}

wp_enqueue_script(
'altapay-applepay-sdk',
Expand Down
9 changes: 6 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ Contributors: altapay_integrations
Tags: AltaPay, Gateway, Payments, WooCommerce, Payment Card Industry
Requires PHP: 7.4
Requires at least: 5.0
Tested up to: 6.8.1
Stable tag: 3.8.1
Tested up to: 6.8.2
Stable tag: 3.8.2
License: MIT
WC requires at least: 3.9.0
WC tested up to: 9.9.4
WC tested up to: 10.0.2
License URI: http://www.gnu.org/licenses/gpl-2.0.html

A plugin that integrates your WooCommerce web shop to the AltaPay payments gateway.
Expand Down Expand Up @@ -39,6 +39,9 @@ AltaPay's Payment Gateway for WooCommerce provides merchants with access to a fu

== Changelog ==

= 3.8.2 =
* Load plugin CSS and JS only on the checkout page to improve performance.

= 3.8.1 =
* Fix: Order line calculations when a cart discount is applied.

Expand Down
6 changes: 3 additions & 3 deletions wiki.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,14 +298,14 @@ The new credentials can now be used as the API Username and API Password in your
## Supported versions

Minimum system requirements are:
- WordPress min. 5.0 – max. 6.8.1
- WooCommerce min. 3.9.0 – max. 9.9.4
- WordPress min. 5.0 – max. 6.8.2
- WooCommerce min. 3.9.0 – max. 10.0.2
- PHP 7.4 and above
- PHP-bcmath library installed.
- PHP-curl MUST be enabled.

The latest tested version is:
- WordPress 6.8.1, WooCommerce 9.9.4 and PHP 8.2
- WordPress 6.8.2, WooCommerce 10.0.2 and PHP 8.2


## Troubleshooting
Expand Down