Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

New: bump min required PHP version to 7.2 #600

Merged
merged 2 commits into from
Sep 12, 2023
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: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1']

steps:
- name: Checkout Git repository
Expand Down
4 changes: 2 additions & 2 deletions includes/views/dompdf-status.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

$server_configs = apply_filters( 'wpo_wcpdf_server_configs' , array(
'PHP version' => array(
'required' => __( '7.1+ (7.4 or higher recommended)', 'woocommerce-pdf-invoices-packing-slips' ),
'required' => __( '7.2+ (7.4 or higher recommended)', 'woocommerce-pdf-invoices-packing-slips' ),
'value' => PHP_VERSION,
'result' => version_compare( PHP_VERSION, '7.1', '>' ),
'result' => version_compare( PHP_VERSION, '7.2', '>' ),
),
'DOMDocument extension' => array(
'required' => true,
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-
Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice, packing slip, export, email, bulk, automatic
Requires at least: 3.5
Tested up to: 6.3
Requires PHP: 7.1
Requires PHP: 7.2
Stable tag: 3.6.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
10 changes: 5 additions & 5 deletions woocommerce-pdf-invoices-packingslips.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@ public function load_classes() {
return;
}

if ( version_compare( PHP_VERSION, '7.2', '<' ) ) {
add_action( 'admin_notices', array ( $this, 'next_php_version_bump' ) );
}
// if ( version_compare( PHP_VERSION, '7.2', '<' ) ) {
// add_action( 'admin_notices', array ( $this, 'next_php_version_bump' ) );
// }

if ( has_filter( 'wpo_wcpdf_pdf_maker' ) === false && version_compare( PHP_VERSION, '7.1', '<' ) ) {
if ( has_filter( 'wpo_wcpdf_pdf_maker' ) === false && version_compare( PHP_VERSION, '7.2', '<' ) ) {
add_filter( 'wpo_wcpdf_document_is_allowed', '__return_false', 99999 );
add_action( 'admin_notices', array ( $this, 'required_php_version' ) );
}
Expand Down Expand Up @@ -234,7 +234,7 @@ public function woocommerce_hpos_compatible() {
* PHP version requirement notice
*/
public function required_php_version() {
$error_message = __( 'PDF Invoices & Packing Slips for WooCommerce requires PHP 7.1 (7.4 or higher recommended).', 'woocommerce-pdf-invoices-packing-slips' );
$error_message = __( 'PDF Invoices & Packing Slips for WooCommerce requires PHP 7.2 (7.4 or higher recommended).', 'woocommerce-pdf-invoices-packing-slips' );
/* translators: <a> tags */
$php_message = __( 'We strongly recommend to %1$supdate your PHP version%2$s.', 'woocommerce-pdf-invoices-packing-slips' );
/* translators: <a> tags */
Expand Down
Loading