Skip to content

Commit

Permalink
Release 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 3, 2024
1 parent d143d99 commit 340611f
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 90 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This repository contains the PostFinance Checkout plugin that enables WooCommerc

## Documentation

* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.0/docs/en/documentation.html)
* [Documentation](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.1/docs/en/documentation.html)

## Support

Expand All @@ -33,4 +33,4 @@ ____________________________________________________________________________

## License

Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.0/LICENSE) for more information.
Please see the [license file](https://github.com/pfpayments/woocommerce/blob/3.0.1/LICENSE) for more information.
1 change: 0 additions & 1 deletion build/index.asset.php

This file was deleted.

1 change: 0 additions & 1 deletion build/index.css

This file was deleted.

1 change: 0 additions & 1 deletion build/index.js

This file was deleted.

9 changes: 8 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ Features:
- Support of Wordpress 6.1
- Support of Woocommerce 7.0.1
Bugfixes:
- Fix that when 0 manual task are needed, the message 0 manuelle Tasks benötigen Ihre Aufmerksamkeit is shown.
- Fix that when 0 manual task are needed, the message ?0 manuelle Tasks ben?tigen Ihre Aufmerksamkeit? is shown.
Tested against:
- PHP 7.4.32
- Wordpress: 6.1
Expand Down Expand Up @@ -727,3 +727,10 @@ Tested against:
- [Tested Against] Woocommerce 8.5.2
- [Tested Against] PHP SDK 4.0.2

= 3.0.1 - April 3 2024 =
- [Feature] Added support to High Performance Order Storage (HPOS).
- [Tested Against] PHP 8.2
- [Tested Against] Wordpress 6.5
- [Tested Against] Woocommerce 8.7.0
- [Tested Against] PHP SDK 4.0.2

4 changes: 2 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="keywords" value="PostFinance Checkout, WooCommerce, Wordpress Plugin, WooCommerce Extension, Payment, Payment Integration, Documentation"><meta name="description" value="The documentation for the PostFinance Checkout plugin that enables processing payments with PostFinance Checkout.">
<link rel="canonical" href="https://plugin-documentation.weareplanet.com/weareplanet/opencart-3.0/1.0.57/docs/en/documentation.html" />
<link rel="canonical" href="https://plugin-documentation.wallee.com/wallee-payment/woocommerce/master/docs/en/documentation.html" />
<title>PostFinance Checkout WooCommerce</title>
<link href="assets/monokai-sublime.css" rel="stylesheet" />
<link href="assets/base.css" rel="stylesheet" />
Expand All @@ -23,7 +23,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.0.0/">
<a href="https://github.com/pfpayments/woocommerce/releases/tag/3.0.1/">
Source
</a>
</li>
Expand Down
51 changes: 18 additions & 33 deletions includes/admin/class-wc-postfinancecheckout-admin-document.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,50 +113,35 @@ public static function add_buttons_to_overview( WC_Order $order ) {

/**
* Add WC Meta boxes.
* @see: https://woo.com/document/high-performance-order-storage/#section-8
*/
public static function add_meta_box() {
global $post;
if ( 'shop_order' !== $post->post_type ) {
return;
}
$order = WC_Order_Factory::get_order( $post->ID );
$method = wc_get_payment_gateway_by_order( $order );
if ( ! ( $method instanceof WC_PostFinanceCheckout_Gateway ) ) {
return;
}
$transaction_info = WC_PostFinanceCheckout_Entity_Transaction_Info::load_by_order_id( $order->get_id() );
if ( $transaction_info->get_id() !== null && in_array(
$transaction_info->get_state(),
$screen = class_exists( '\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController' )
&& wc_get_container()->get( \Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled()
? wc_get_page_screen_id( 'shop-order' )
: 'shop_order';
add_meta_box(
'woocommerce-order-postfinancecheckout-documents',
__( 'PostFinance Checkout Documents', 'woo-postfinancecheckout' ),
array(
\PostFinanceCheckout\Sdk\Model\TransactionState::COMPLETED,
\PostFinanceCheckout\Sdk\Model\TransactionState::FULFILL,
\PostFinanceCheckout\Sdk\Model\TransactionState::DECLINE,
__CLASS__,
'output',
),
true
) ) {
add_meta_box(
'woocommerce-order-postfinancecheckout-documents',
__( 'PostFinance Checkout Documents', 'woo-postfinancecheckout' ),
array(
__CLASS__,
'output',
),
'shop_order',
'side',
'default'
);
}
$screen,
'side',
'default'
);
}

/**
* Output the metabox.
*
* @param WP_Post $post Post.
* @param WP_Post|WP_Order $post_or_order_object
* This object is provided by woocommerce when using its screen.
*/
public static function output( $post ) {
global $post;
public static function output( $post_or_order_object ) {
$order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;

$order = WC_Order_Factory::get_order( $post->ID );
$method = wc_get_payment_gateway_by_order( $order );
if ( ! ( $method instanceof WC_PostFinanceCheckout_Gateway ) ) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public function get_settings() {
$settings = array(
array(
'links' => array(
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.0/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
'https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.1/docs/en/documentation.html' => __( 'Documentation', 'woo-postfinancecheckout' ),
'https://checkout.postfinance.ch/en-ch/user/signup' => __( 'Sign Up', 'woo-postfinancecheckout' ),
),
'type' => 'postfinancecheckout_links',
Expand Down
56 changes: 23 additions & 33 deletions includes/admin/class-wc-postfinancecheckout-admin-transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,45 +41,35 @@ public static function init() {

/**
* Add WC Meta boxes.
* @see: https://woo.com/document/high-performance-order-storage/#section-8
*/
public static function add_meta_box() {
global $post;
if ( 'shop_order' != $post->post_type ) {
return;
}
$order = WC_Order_Factory::get_order( $post->ID );
$method = wc_get_payment_gateway_by_order( $order );
if ( ! ( $method instanceof WC_PostFinanceCheckout_Gateway ) ) {
return;
}
$transaction_info = WC_PostFinanceCheckout_Entity_Transaction_Info::load_by_order_id( $order->get_id() );
if ( $transaction_info->get_id() == null ) {
$transaction_info = WC_PostFinanceCheckout_Entity_Transaction_Info::load_newest_by_mapped_order_id( $order->get_id() );
}
if ( $transaction_info->get_id() != null ) {
add_meta_box(
'woocommerce-order-postfinancecheckout-transaction',
__( 'PostFinance Checkout Transaction', 'woocommerc-postfinancecheckout' ),
array(
__CLASS__,
'output',
),
'shop_order',
'normal',
'default'
);
}
$screen = class_exists( '\Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController' )
&& wc_get_container()->get( \Automattic\WooCommerce\Internal\DataStores\Orders\CustomOrdersTableController::class )->custom_orders_table_usage_is_enabled()
? wc_get_page_screen_id( 'shop-order' )
: 'shop_order';
add_meta_box(
'woocommerce-order-postfinancecheckout-transaction',
__( 'PostFinance Checkout Transaction', 'woocommerce-postfinancecheckout' ),
array(
__CLASS__,
'output',
),
$screen,
'normal',
'default'
);
}

/**
* Output the metabox.
*
* @param WP_Post $post post data.
* @param WP_Post|WP_Order $post_or_order_object
* This object is provided by woocommerce when using its screen.
*/
public static function output( $post ) {
global $post;
public static function output( $post_or_order_object ) {
$order = ( $post_or_order_object instanceof WP_Post ) ? wc_get_order( $post_or_order_object->ID ) : $post_or_order_object;

$order = WC_Order_Factory::get_order( $post->ID );
$method = wc_get_payment_gateway_by_order( $order );
if ( ! ( $method instanceof WC_PostFinanceCheckout_Gateway ) ) {
return;
Expand Down Expand Up @@ -129,7 +119,7 @@ public static function output( $post ) {
<td class="value"><strong><?php esc_html_e( $transaction_info->get_order_id() ); ?></strong></td>
</tr>
<?php endif; ?>

<?php if ( $transaction_info->get_failure_reason() != null ) : ?>
<tr>
<td class="label"><label><?php esc_html_e( 'Failure Reason', 'woo-postfinancecheckout' ); ?></label></td>
Expand All @@ -155,7 +145,7 @@ public static function output( $post ) {
</tbody>
</table>
</div>


<?php if ( ! empty( $labels_by_group ) ) : ?>
<?php foreach ( $labels_by_group as $group ) : ?>
Expand All @@ -177,7 +167,7 @@ public static function output( $post ) {
</table>
</div>
</div>

<?php endforeach; ?>
<?php endif; ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion includes/class-wc-postfinancecheckout-migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public static function check_version() {
public static function plugin_row_meta( $links, $file ) {
if ( WC_POSTFINANCECHECKOUT_PLUGIN_BASENAME === $file ) {
$row_meta = array(
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.0/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
'docs' => '<a href="https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.1/docs/en/documentation.html" aria-label="' . esc_attr__( 'View Documentation', 'woo-postfinancecheckout' ) . '">' . esc_html__( 'Documentation', 'woo-postfinancecheckout' ) . '</a>',
);

return array_merge( $links, $row_meta );
Expand Down
14 changes: 7 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: postfinancecheckout AG
Tags: woocommerce PostFinance Checkout, woocommerce, PostFinance Checkout, payment, e-commerce, webshop, psp, invoice, packing slips, pdf, customer invoice, processing
Requires at least: 4.7
Tested up to: 6.2
Stable tag: 3.0.0
Stable tag: 3.0.1
License: Apache 2
License URI: http://www.apache.org/licenses/LICENSE-2.0

Expand All @@ -23,7 +23,7 @@ To use this extension, a PostFinance Checkout account is required. Sign up on [P

== Documentation ==

Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.0/docs/en/documentation.html).
Additional documentation for this plugin is available [here](https://plugin-documentation.postfinance-checkout.ch/pfpayments/woocommerce/3.0.1/docs/en/documentation.html).

== Support ==

Expand Down Expand Up @@ -56,9 +56,9 @@ Support queries can be issued on the [PostFinance Checkout support site](https:/
== Changelog ==


= 3.0.0 - February 20 2024 =
- [Feature] Full version release
- [Tested Against] PHP 8.0
- [Tested Against] Wordpress 6.4.3
- [Tested Against] Woocommerce 8.5.2
= 3.0.1 - April 3 2024 =
- [Feature] Added support to High Performance Order Storage (HPOS).
- [Tested Against] PHP 8.2
- [Tested Against] Wordpress 6.5
- [Tested Against] Woocommerce 8.7.0
- [Tested Against] PHP SDK 4.0.2
17 changes: 10 additions & 7 deletions woocommerce-postfinancecheckout.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@
* Plugin Name: PostFinance Checkout
* Plugin URI: https://wordpress.org/plugins/woo-postfinancecheckout
* Description: Process WooCommerce payments with PostFinance Checkout.
* Version: 3.0.0
* License: Apache2
* License URI: http://www.apache.org/licenses/LICENSE-2.0
* Author: postfinancecheckout AG
* Author URI: https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html
* Requires at least: 4.7
* Tested up to: 6.3
* WC requires at least: 3.0.0
* WC tested up to: 7.8.2
*
* Text Domain: postfinancecheckout
* Domain Path: /languages/
Expand Down Expand Up @@ -39,14 +34,14 @@ final class WooCommerce_PostFinanceCheckout {
const CK_INTEGRATION = 'wc_postfinancecheckout_integration';
const CK_ORDER_REFERENCE = 'wc_postfinancecheckout_order_reference';
const CK_ENFORCE_CONSISTENCY = 'wc_postfinancecheckout_enforce_consistency';
const WC_MAXIMUM_VERSION = '8.5.2';
const WC_MAXIMUM_VERSION = '8.7.0';

/**
* WooCommerce PostFinanceCheckout version.
*
* @var string
*/
private $version = '3.0.0';
private $version = '3.0.1';

/**
* The single instance of the class.
Expand Down Expand Up @@ -447,6 +442,14 @@ public function loaded() {
10,
2
);


add_action( 'before_woocommerce_init', function() {
if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) {
\Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', __FILE__, true );
}
} );

}

/**
Expand Down

0 comments on commit 340611f

Please sign in to comment.