Plugin Directory

Changeset 2989450


Ignore:
Timestamp:
11/05/2023 09:47:02 PM (2 years ago)
Author:
bluempaymentservices
Message:

1.3.17.12: Stability fixes and improvements.

Location:
bluem
Files:
1330 added
20 edited

Legend:

Unmodified
Added
Removed
  • bluem/trunk/README.md

    r2975761 r2989450  
    170170bluem_is_ajax=true
    171171```
     172Also, add a checkbox with the name 'bluem_mandate_approve'. This will give the user-permission to perform the mandate request.
     173Otherwise, the form will be submitted but our mandate request wouldn't be executed. U can mark the checkbox within ContactForm 7 as required to always force the mandate request after form submission.
    172174
    173175## Gravity Forms
    174176To activate our Gravity Forms integration, you have to add some hidden fields to the form to activate the flow.
    175 ```
     177```php
    176178bluem_mandate=true
    177179bluem_mandate_reason="Lidmaatschap"
     
    181183bluem_is_ajax=true
    182184```
    183 Also, add a checkbox with the name 'bluem_mandate_approve' (under 'Advanced' section, after enabling dynamic entries) and a label with the value 'true'. This will give the permission to perform the mandate request.
    184 
    185 Also, if you want to store transaction details, you have to name the fields with the following names:
     185Also, add a checkbox with the name 'bluem_mandate_approve' (under 'Advanced' section, after enabling dynamic entries) and a label with the value 'true'. This will give the user-permission to perform the mandate request.
     186Otherwise, the form will be submitted but our mandate request wouldn't be executed. U can mark the checkbox within Gravity Forms as required to always force the mandate request after form submission.
     187
     188Also, if you want to store additional transaction details, add hidden fields with the following field names.
     189Our plug-in will fill these fields so that they are saved with the other form data.
     190The transaction and details are always visible through our plug-in page.
    186191```php
    187192bluem_mandate_accountname = Name of the accountholder
  • bluem/trunk/bluem-db.php

    r2975761 r2989450  
    207207            $record_id = $result[0]->id;
    208208
     209            $new_object = [];
     210
    209211            if ( $decoded_data !== null ) {
    210                 $new_object = [];
    211 
    212212                // Loop through current data
    213213                foreach ($decoded_data as $key => $value) {
    214214                    $new_object[$key] = $value;
    215215                }
    216 
    217                 // Loop through new data
    218                 foreach ($object as $key => $value) {
    219                     $new_object[$key] = $value; // Overwrite if key exists
    220                 }
    221 
    222                 return bluem_db_update_storage($record_id, [
    223                     'data' => json_encode( $new_object ),
    224                 ]);
    225216            }
     217
     218            // Loop through new data
     219            foreach ($object as $key => $value) {
     220                $new_object[$key] = $value; // Overwrite if key exists
     221            }
     222
     223            return bluem_db_update_storage($record_id, [
     224                'data' => json_encode( $new_object ),
     225            ]);
    226226        }
    227227    }
  • bluem/trunk/bluem-idin.php

    r2981398 r2989450  
    21432143            $validation_text = "";
    21442144            if ( get_user_meta( $current_user->ID, 'bluem_idin_validated', true ) ) {
    2145                 $validation_text = __( 'ja', 'bluem' );
     2145                $validation_text = __( 'yes', 'bluem' );
    21462146                // $validation_text .= " (Transactie ". get_user_meta($current_user->ID, 'bluem_idin_transaction_id', true).")";
    21472147            } else {
    2148                 $validation_text = __( 'ja, als gastgebruiker', 'bluem' );
     2148                $validation_text = __( 'yes, as a guest user', 'bluem' );
    21492149            }
    21502150        }
    21512151
    21522152        $fields['bluem_idin_validated'] = [
    2153             'label' => __( 'Identiteit geverifieerd', 'bluem' ),
     2153            'label' => __( 'Identity verified', 'bluem' ),
    21542154            'value' => $validation_text
    21552155        ];
     
    21812181
    21822182                $fields['bluem_idin_address'] = [
    2183                     'label' => __( 'Adres uit verificatie', 'bluem' ),
     2183                    'label' => __( 'Address from verification', 'bluem' ),
    21842184                    'value' => $address_text
    21852185                ];
    21862186            } else {
    21872187                $fields['bluem_idin_address'] = [
    2188                     'label' => __( 'Adres uit verificatie', 'bluem' ),
    2189                     'value' => "Onbekend"
     2188                    'label' => __( 'Address from verification', 'bluem' ),
     2189                    'value' => __( 'Unknown', 'bluem' )
    21902190                ];
    21912191            }
     
    22162216
    22172217            $fields['bluem_idin_name'] = [
    2218                 'label' => __( 'Naam uit verificatie', 'bluem' ),
     2218                'label' => __( 'Name from verification', 'bluem' ),
    22192219                'value' => $name_text
    22202220            ];
    22212221        } else {
    22222222            $fields['bluem_idin_name'] = [
    2223                 'label' => __( 'Naam uit verificatie', 'bluem' ),
    2224                 'value' => "Onbekend"
     2223                'label' => __( 'Name from verification', 'bluem' ),
     2224                'value' => __( 'Unknown', 'bluem' )
    22252225            ];
    22262226        }
     
    22402240
    22412241            $fields['bluem_idin_birthdate'] = [
    2242                 'label' => __( 'Geboortedatum uit verificatie', 'bluem' ),
     2242                'label' => __( 'Date of birth from verification', 'bluem' ),
    22432243                'value' => $birthdate_text
    22442244            ];
    22452245        } else {
    22462246            $fields['bluem_idin_birthdate'] = [
    2247                 'label' => __( 'Geboortedatum uit verificatie', 'bluem' ),
    2248                 'value' => "Onbekend"
     2247                'label' => __( 'Date of birth from verification', 'bluem' ),
     2248                'value' => __( 'Unknown', 'bluem' )
    22492249            ];
    22502250        }
  • bluem/trunk/bluem-integrations.php

    r2975761 r2989450  
    9090/**
    9191 * ContactForm 7 integration.
    92  * 
     92 *
    9393 * Javascript code in footer.
    9494 */
     
    144144/**
    145145 * Gravity Forms integration.
    146  * 
     146 *
    147147 * Javascript code in footer.
    148148 */
     
    251251                );
    252252
    253                 // Save the necessary data to later request more information and refer to this transaction
    254                 bluem_db_insert_storage([
    255                     'bluem_integration_wpcf7_form_id' => $contact_form_id,
    256                     'bluem_mandate_transaction_id' => $request->mandateID,
    257                     'bluem_mandate_entrance_code' => $request->entranceCode,
    258                 ]);
    259 
    260253                // Actually perform the request.
    261254                try {
     
    268261                        if ( isset( $response->EMandateTransactionResponse->Error->ErrorMessage ) ) {
    269262                            $msg .= "<br>" .
    270                                     $response->EMandateTransactionResponse->Error->ErrorMessage;
     263                                $response->EMandateTransactionResponse->Error->ErrorMessage;
    271264                        } elseif ( get_class( $response ) == "Bluem\BluemPHP\ErrorBluemResponse" ) {
    272265                            $msg .= "<br>" .
    273                                     $response->Error();
     266                                $response->Error();
    274267                        } else {
    275268                            $msg .= "<br>Algemene fout";
     
    297290                        'bluem_mandate_transaction_id' => $mandate_id,
    298291                        'bluem_mandate_transaction_url' => $transactionURL,
     292                        'bluem_integration_wpcf7_form_id' => $contact_form_id,
     293                        'bluem_mandate_entrance_code' => $request->entranceCode,
    299294                    ]);
    300295
     
    369364
    370365    $bluem_mandate_approve = $contact_form->pref( 'bluem_mandate_approve' );
    371    
     366
    372367    $bluem_mandate_reason = $contact_form->pref( 'bluem_mandate_reason' );
    373    
     368
    374369    /**
    375370     * TODO: Add to request.
     
    432427                );
    433428
    434                 // Save the necessary data to later request more information and refer to this transaction
    435                 bluem_db_insert_storage([
    436                     'bluem_integration_wpcf7_form_id' => $contact_form_id,
    437                     'bluem_mandate_transaction_id' => $request->mandateID,
    438                     'bluem_mandate_entrance_code' => $request->entranceCode,
    439                 ]);
    440 
    441429                // Actually perform the request.
    442430                try {
     
    449437                        if ( isset( $response->EMandateTransactionResponse->Error->ErrorMessage ) ) {
    450438                            $msg .= "<br>" .
    451                                     $response->EMandateTransactionResponse->Error->ErrorMessage;
     439                                $response->EMandateTransactionResponse->Error->ErrorMessage;
    452440                        } elseif ( get_class( $response ) == "Bluem\BluemPHP\ErrorBluemResponse" ) {
    453441                            $msg .= "<br>" .
    454                                     $response->Error();
     442                                $response->Error();
    455443                        } else {
    456444                            $msg .= "<br>Algemene fout";
     
    476464                        'bluem_mandate_transaction_id' => $mandate_id,
    477465                        'bluem_mandate_transaction_url' => $transactionURL,
     466                        'bluem_integration_wpcf7_form_id' => $contact_form_id,
     467                        'bluem_mandate_entrance_code' => $request->entranceCode,
    478468                    ]);
    479469
     
    792782        }
    793783    }
    794    
     784
    795785    // Get custom parameters for this form
    796786    $bluem_mandate = $form_data['bluem_mandate'];
     
    800790    $bluem_mandate_reason = $form_data['bluem_mandate_reason'];
    801791    $bluem_mandate_type = $form_data['bluem_mandate_type'];
    802    
     792
    803793    $bluem_is_ajax = $form_data['bluem_is_ajax'];
    804794
     
    872862                );
    873863
    874                 // Save the necessary data to later request more information and refer to this transaction
    875                 bluem_db_insert_storage([
    876                     'bluem_integration_gform_form_id' => $payload['form_id'],
    877                     'bluem_integration_gform_entry_id' => $payload['entry_id'],
    878                     'bluem_mandate_transaction_id' => $request->mandateID,
    879                     'bluem_mandate_entrance_code' => $request->entranceCode,
    880                 ]);
    881 
    882864                // Actually perform the request.
    883865                try {
     
    890872                        if ( isset( $response->EMandateTransactionResponse->Error->ErrorMessage ) ) {
    891873                            $msg .= "<br>" .
    892                                     $response->EMandateTransactionResponse->Error->ErrorMessage;
     874                                $response->EMandateTransactionResponse->Error->ErrorMessage;
    893875                        } elseif ( get_class( $response ) == "Bluem\BluemPHP\ErrorBluemResponse" ) {
    894876                            $msg .= "<br>" .
    895                                     $response->Error();
     877                                $response->Error();
    896878                        } else {
    897879                            $msg .= "<br>Algemene fout";
     
    917899                        'bluem_mandate_transaction_id' => $mandate_id,
    918900                        'bluem_mandate_transaction_url' => $transactionURL,
     901                        'bluem_integration_gform_form_id' => $payload['form_id'],
     902                        'bluem_integration_gform_entry_id' => $payload['entry_id'],
     903                        'bluem_mandate_entrance_code' => $request->entranceCode,
    919904                    ]);
    920905
     
    11341119             */
    11351120            $entry = GFAPI::get_entry( $entryID );
    1136            
     1121
    11371122            // Get the form instance
    11381123            $form = GFAPI::get_form( $formID );
     
    13401325         */
    13411326        $entry = GFAPI::get_entry( $entry_id );
    1342        
     1327
    13431328        // Get the form instance
    13441329        $form = GFAPI::get_form( $entry['form_id'] );
  • bluem/trunk/bluem-interface.php

    r2959619 r2989450  
    2424function bluem_render_request_table( $requests, $users_by_id = [] ) {
    2525    if ( count( $requests ) == 0 ) {
    26         echo "<p>" . __( "Nog geen transacties", 'bluem' ) . "</p>";
     26        echo "<p>" . __( "No transactions yet", 'bluem' ) . "</p>";
    2727
    2828        return;
  • bluem/trunk/bluem-mandates-instant.php

    r2975761 r2989450  
    6666            );
    6767
    68             // Save the necessary data to later request more information and refer to this transaction
    69             bluem_db_insert_storage([
    70                 'bluem_mandate_transaction_id' => $request->mandateID,
    71                 'bluem_mandate_entrance_code' => $request->entranceCode,
    72             ]);
    73 
    7468            // Actually perform the request.
    7569            try {
     
    8276                    if ( isset( $response->EMandateTransactionResponse->Error->ErrorMessage ) ) {
    8377                        $msg .= "<br>" .
    84                                 $response->EMandateTransactionResponse->Error->ErrorMessage;
     78                            $response->EMandateTransactionResponse->Error->ErrorMessage;
    8579                    } elseif ( get_class( $response ) == "Bluem\BluemPHP\ErrorBluemResponse" ) {
    8680                        $msg .= "<br>" .
    87                                 $response->Error();
     81                            $response->Error();
    8882                    } else {
    8983                        $msg .= "<br>Algemene fout";
     
    108102                    'bluem_mandate_transaction_id' => $mandate_id,
    109103                    'bluem_mandate_transaction_url' => $transactionURL,
     104                    'bluem_mandate_entrance_code' => $request->entranceCode,
    110105                ]);
    111106
  • bluem/trunk/bluem.php

    r2981419 r2989450  
    22/**
    33 * Plugin Name: Bluem ePayments, iDIN and eMandates integration for shortcodes and WooCommerce checkout
    4  * Version: 1.3.17.11
     4 * Version: 1.3.17.12
    55 * Plugin URI: https://wordpress.org/plugins/bluem
    66 * Description: Bluem integration for WordPress and WooCommerce to facilitate Bluem services inside your site. Payments and eMandates payment gateway and iDIN identity verification
     
    1414 *
    1515 * Text Domain: bluem
    16  * Domain Path: /lang/
    1716 *
    1817 * @package WordPress
     
    285284    // Retrieve the version constraint of the specified dependency
    286285    $version_constraint = reset($package_entry)['version'];
    287    
     286
    288287    return $version_constraint;
    289288}
     
    472471
    473472                    $new_data['report'] = $identityReport;
    474                    
     473
    475474                    if ( count( $new_data ) > 0 ) {
    476475                        bluem_db_put_request_payload(
     
    526525            $statusUpdateObject = $response->EMandateStatusUpdate;
    527526
    528             $statusCode = $statusUpdateObject->EMandateStatus->Status . "";
     527            $statusCode = $statusUpdateObject->EMandateStatus->Status . "";
    529528
    530529            /**
     
    545544            if ( $statusCode === "Success" ) {
    546545                if ( !empty ( $order ) ) {
    547                     $order->update_status( 'processing', __( 'Machtiging is binnengekomen', 'wc-gateway-bluem' ) );
    548                     $order->add_order_note( __( "Betalingsproces voltooid" ) );
     546                    $order->update_status( 'processing', __( 'Authorization has been received', 'bluem' ) );
     547                    $order->add_order_note( __( "Payment process completed", 'bluem' ) );
    549548                }
    550549
    551550                if ( !empty( $request->id ) ) {
    552551                    $new_data = [];
    553                    
     552
    554553                    if ( isset( $response->EMandateStatusUpdate->EMandateStatus->PurchaseID ) ) {
    555554                        $new_data['purchaseID'] = $response->EMandateStatusUpdate->EMandateStatus->PurchaseID;
    556555                    }
    557                    
     556
    558557                    if ( isset( $response->EMandateStatusUpdate->EMandateStatus->AcceptanceReport ) ) {
    559558                        $new_data['report'] = $response->EMandateStatusUpdate->EMandateStatus->AcceptanceReport;
    560559                    }
    561                    
     560
    562561                    if ( count( $new_data ) > 0 ) {
    563562                        bluem_db_put_request_payload(
     
    571570            } elseif ( $statusCode === "Cancelled" ) {
    572571                if ( !empty ( $order ) ) {
    573                     $order->update_status( 'cancelled', __( 'Machtiging is geannuleerd', 'wc-gateway-bluem' ) );
     572                    $order->update_status( 'cancelled', __( 'Authorization has been canceled', 'bluem' ) );
    574573                }
    575574            } elseif ( $statusCode === "Open" ) {
     
    577576            } elseif ( $statusCode === "Expired" ) {
    578577                if ( !empty ( $order ) ) {
    579                     $order->update_status( 'failed', __( 'Machtiging is verlopen', 'wc-gateway-bluem' ) );
     578                    $order->update_status( 'failed', __( 'Authorization has expired', 'bluem' ) );
    580579                }
    581580            } elseif ( $statusCode === "New" ) {
     
    583582            } else {
    584583                if ( !empty ( $order ) ) {
    585                     $order->update_status( 'failed', __( 'Machtiging is gefaald: fout of onbekende status', 'wc-gateway-bluem' ) );
     584                    $order->update_status( 'failed', __( 'Authorization failed: error or unknown status', 'bluem' ) );
    586585                }
    587586            }
     
    619618            $statusUpdateObject = $response->PaymentStatusUpdate;
    620619
    621             $statusCode = $statusUpdateObject->Status . "";
     620            $statusCode = $statusUpdateObject->Status . "";
    622621
    623622            /**
     
    638637            if ( $statusCode === "Success" ) {
    639638                if ( !empty ( $order ) ) {
    640                     $order->update_status( 'processing', __( 'Betaling is binnengekomen', 'wc-gateway-bluem' ) );
    641                     $order->add_order_note( __( "Betalingsproces voltooid" ) );
     639                    $order->update_status( 'processing', __( 'Betaling is binnengekomen', 'bluem' ) );
     640                    $order->add_order_note( __( "Betalingsproces voltooid", 'bluem' ) );
    642641                }
    643642            } elseif ( $statusCode === "Pending" ) {
     
    645644            } elseif ( $statusCode === "Cancelled" ) {
    646645                if ( !empty ( $order ) ) {
    647                     $order->update_status( 'cancelled', __( 'Betaling is geannuleerd', 'wc-gateway-bluem' ) );
     646                    $order->update_status( 'cancelled', __( 'Betaling is geannuleerd', 'bluem' ) );
    648647                }
    649648            } elseif ( $statusCode === "Open" ) {
     
    651650            } elseif ( $statusCode === "Expired" ) {
    652651                if ( !empty ( $order ) ) {
    653                     $order->update_status( 'failed', __( 'Betaling is verlopen', 'wc-gateway-bluem' ) );
     652                    $order->update_status( 'failed', __( 'Betaling is verlopen', 'bluem' ) );
    654653                }
    655654            } elseif ( $statusCode === "New" ) {
     
    657656            } else {
    658657                if ( !empty ( $order ) ) {
    659                     $order->update_status( 'failed', __( 'Betaling is gefaald: fout of onbekende status', 'wc-gateway-bluem' ) );
     658                    $order->update_status( 'failed', __( 'Betaling is gefaald: fout of onbekende status', 'bluem' ) );
    660659                }
    661660            }
     
    789788        add_settings_section(
    790789            'bluem_woocommerce_modules_section',
    791             _( 'Beheer onderdelen van deze plug-in' ),
     790            _( 'Manage components of this plugin', 'bluem' ),
    792791            'bluem_woocommerce_modules_settings_section',
    793792            'bluem_woocommerce'
     
    795794        add_settings_field(
    796795            "mandates_enabled",
    797             _( "Mandates actief" ),
     796            _( "eMandates active", 'bluem' ),
    798797            "bluem_woocommerce_modules_render_mandates_activation",
    799798            "bluem_woocommerce",
     
    802801        add_settings_field(
    803802            "payments_enabled",
    804             _( "ePayments actief" ),
     803            _( "ePayments active", 'bluem' ),
    805804            "bluem_woocommerce_modules_render_payments_activation",
    806805            "bluem_woocommerce",
     
    809808        add_settings_field(
    810809            "idin_enabled",
    811             _( "iDIN actief" ),
     810            _( "iDIN active", 'bluem' ),
    812811            "bluem_woocommerce_modules_render_idin_activation",
    813812            "bluem_woocommerce",
     
    816815        add_settings_field(
    817816            "suppress_warning",
    818             _( "In admin omgeving waarschuwen als plugin nog niet goed is ingesteld" ),
     817            _( "Warn in admin environment if plugin has not yet been set up properly", 'bluem' ),
    819818            "bluem_woocommerce_modules_render_suppress_warning",
    820819            "bluem_woocommerce",
     
    823822        add_settings_section(
    824823            'bluem_woocommerce_general_section',
    825             '<span class="dashicons dashicons-admin-settings"></span> Algemene instellingen',
     824            '<span class="dashicons dashicons-admin-settings"></span> ' . _( "General settings", 'bluem' ),
    826825            'bluem_woocommerce_general_settings_section',
    827826            'bluem_woocommerce'
     
    842841        add_settings_section(
    843842            'bluem_woocommerce_mandates_section',
    844             '<span class="dashicons dashicons-money"></span> Digitale Incassomachtiging instellingen',
     843            '<span class="dashicons dashicons-money"></span> ' . _( "eMandates settings", 'bluem' ),
    845844            'bluem_woocommerce_mandates_settings_section',
    846845            'bluem_woocommerce'
     
    864863        add_settings_section(
    865864            'bluem_woocommerce_payments_section',
    866             '<span class="dashicons dashicons-money-alt"></span> ePayments payments instellingen',
     865            '<span class="dashicons dashicons-money-alt"></span> ' . _( "ePayments settings", 'bluem' ),
    867866            'bluem_woocommerce_payments_settings_section',
    868867            'bluem_woocommerce'
     
    887886        add_settings_section(
    888887            'bluem_woocommerce_idin_section',
    889             '<span class="dashicons dashicons-admin-users"></span> iDIN instellingen',
     888            '<span class="dashicons dashicons-admin-users"></span> ' . _( "eIdentity settings", 'bluem' ),
    890889            'bluem_woocommerce_idin_settings_section',
    891890            'bluem_woocommerce'
     
    909908    add_settings_section(
    910909        'bluem_woocommerce_integrations_section',
    911         '<span class="dashicons dashicons-admin-plugins"></span> Integratie instellingen',
     910        '<span class="dashicons dashicons-admin-plugins"></span> ' . _( "integration settings", 'bluem' ),
    912911        'bluem_woocommerce_integrations_settings_section',
    913912        'bluem_woocommerce'
     
    929928
    930929    $user = wp_get_current_user();
    931    
     930
    932931    // Check if user is administrator
    933932    if (in_array('administrator', $user->roles)) {
     
    944943}
    945944
     945// Only executed on admin pages and AJAX requests.
    946946add_action( 'admin_init', 'bluem_woocommerce_register_settings' );
     947
     948function bluem_woocommerce_init() {
     949    /**
     950     * Create session storage.
     951     */
     952    bluem_db_insert_storage([
     953        'bluem_storage_init' => true,
     954    ]);
     955}
     956
     957// Always executed while plug-in is activated
     958add_action( 'init', 'bluem_woocommerce_init' );
    947959
    948960add_action( 'show_user_profile', 'bluem_woocommerce_show_general_profile_fields', 1 );
     
    10371049                ?>
    10381050                <option
    1039                     value="<?php echo $option_value; ?>" <?php if ( isset( $values[ $key ] ) && $values[ $key ] !== "" && $option_value == $values[ $key ] ) {
     1051                        value="<?php echo $option_value; ?>" <?php if ( isset( $values[ $key ] ) && $values[ $key ] !== "" && $option_value == $values[ $key ] ) {
    10401052                    echo "selected='selected'";
    10411053                } ?>><?php echo $option_name; ?></option>
     
    12231235function bluem_woocommerce_register_age_verification_attribute() {
    12241236    $args = array(
    1225       'name'         => 'Age verification',
    1226       'slug'         => 'age_verification',
    1227       'type'         => 'select',
    1228       'order_by'     => 'menu_order',
    1229       'has_archives' => true,
     1237        'name'         => 'Age verification',
     1238        'slug'         => 'age_verification',
     1239        'type'         => 'select',
     1240        'order_by'     => 'menu_order',
     1241        'has_archives' => true,
    12301242    );
    12311243    register_taxonomy( 'pa_age_verification', 'product', $args );
     
    12481260
    12491261    echo '<div class="options_group">';
    1250    
     1262
    12511263    // Custom Attribute Field
    12521264    woocommerce_wp_select( array(
    12531265        'id' => 'age_verification',
    1254         'label' => __('Age verification', 'bluem-woocommerce'),
     1266        'label' => __('Age verification', 'bluem'),
    12551267        'placeholder' => '',
    12561268        'options' => array(
    1257             'enable' => __('Enable', 'bluem-woocommerce'),
    1258             'disable' => __('Disable', 'bluem-woocommerce'),
     1269            'enable' => __('Enable', 'bluem'),
     1270            'disable' => __('Disable', 'bluem'),
    12591271        ),
    12601272        'value' => $age_verification_value,
    12611273    ));
    1262    
     1274
    12631275    echo '</div>';
    12641276}
     
    12721284        return;
    12731285    }
    1274  
     1286
    12751287    if ( isset( $_POST['age_verification'] ) ) {
    12761288        $attribute_value = isset($_POST['age_verification']) ? sanitize_text_field($_POST['age_verification']) : '';
     
    13021314
    13031315    if ( ! isset( $settings['error_reporting_email'] )
    1304          || $settings['error_reporting_email'] == 1
     1316        || $settings['error_reporting_email'] == 1
    13051317    ) {
    13061318        if ( $debug ) {
     
    13701382
    13711383    $bluem_options = get_option( 'bluem_woocommerce_options' );
    1372    
     1384
    13731385    $bluem_registration = get_option( 'bluem_woocommerce_registration' );
    13741386
     
    13881400    $data->{'Tech telephone'} = $bluem_registration['tech_contact']['telephone'];
    13891401    $data->{'Tech email'} = $bluem_registration['tech_contact']['email'];
    1390     $data->{'WooCommerce version'} = class_exists('WooCommerce') ? WC()->version : __('WooCommerce niet geinstalleerd.', 'bluem-woocommerce');
     1402    $data->{'WooCommerce version'} = class_exists('WooCommerce') ? WC()->version : __('WooCommerce not installed', 'bluem');
    13911403    $data->{'WordPress version'} = get_bloginfo( 'version' );
    13921404    $data->{'Bluem PHP-library'} = $dependency_bluem_php_version;
     
    14941506
    14951507    if ( ! isset( $settings['transaction_notification_email'] )
    1496          || $settings['transaction_notification_email'] == 1
     1508        || $settings['transaction_notification_email'] == 1
    14971509    ) {
    14981510        if ( $debug ) {
     
    16641676    }
    16651677    if ( $bluem_options !== false
    1666          && ! isset( $bluem_options["{$module}_enabled"] )
    1667          || $bluem_options["{$module}_enabled"] == "1"
     1678        && ! isset( $bluem_options["{$module}_enabled"] )
     1679        || $bluem_options["{$module}_enabled"] == "1"
    16681680    ) {
    16691681        return true;
     
    17261738        $messages    = [];
    17271739        if ( ! array_key_exists( 'senderID', $options )
    1728              || $options['senderID'] === ""
     1740            || $options['senderID'] === ""
    17291741        ) {
    17301742            $messages[]  = "SenderID ontbreekt";
     
    17321744        }
    17331745        if ( ! array_key_exists( 'test_accessToken', $options )
    1734              || $options['test_accessToken'] === ""
     1746            || $options['test_accessToken'] === ""
    17351747        ) {
    17361748            $messages[]  = "Test accessToken ontbreekt";
     
    17391751
    17401752        if ( isset( $options['environment'] )
    1741              && $options['environment'] == "prod"
    1742              && (
    1743                  ! array_key_exists( 'production_accessToken', $options )
    1744                  || $options['production_accessToken'] === ""
    1745              )
     1753            && $options['environment'] == "prod"
     1754            && (
     1755                ! array_key_exists( 'production_accessToken', $options )
     1756                || $options['production_accessToken'] === ""
     1757            )
    17461758        ) {
    17471759            $messages[]  = "Production accessToken ontbreekt";
     
    17501762
    17511763        if ( bluem_module_enabled( 'mandates' )
    1752              && (
    1753                  ! array_key_exists( 'brandID', $options )
    1754                  || $options['brandID'] === ""
    1755              )
     1764            && (
     1765                ! array_key_exists( 'brandID', $options )
     1766                || $options['brandID'] === ""
     1767            )
    17561768        ) {
    17571769            $messages[]  = "eMandates brandID ontbreekt";
     
    17601772
    17611773        if ( bluem_module_enabled( 'mandates' )
    1762              && (
    1763                  ! array_key_exists( 'merchantID', $options )
    1764                  || $options['merchantID'] === ""
    1765              )
     1774            && (
     1775                ! array_key_exists( 'merchantID', $options )
     1776                || $options['merchantID'] === ""
     1777            )
    17661778        ) {
    17671779            $messages[]  = "eMandates merchantID ontbreekt";
     
    17701782
    17711783        if ( bluem_module_enabled( 'idin' )
    1772              && ( ! array_key_exists( 'IDINBrandID', $options )
    1773                   || $options['IDINBrandID'] === "" )
     1784            && ( ! array_key_exists( 'IDINBrandID', $options )
     1785                || $options['IDINBrandID'] === "" )
    17741786        ) {
    17751787            $messages[]  = "iDIN BrandID ontbreekt";
     
    18441856    add_meta_box(
    18451857        'bluem_order_requests_metabox_content',
    1846         __(
    1847             'Bluem request(s)',
    1848             'bluem'
    1849         ),
     1858        __('Bluem request(s)', 'bluem'),
    18501859        'bluem_order_requests_metabox_content',
    18511860        'shop_order',
     
    18931902    margin:40pt auto; padding:10pt 20pt; border:1px solid #eee;
    18941903    background:#fff; max-width:500px;'>" .
    1895            bluem_get_bluem_logo_html( 48 );
     1904        bluem_get_bluem_logo_html( 48 );
    18961905}
    18971906
     
    19051914function bluem_dialogs_get_simple_footer( bool $include_link = true ): string {
    19061915    return (
    1907            $include_link ?
    1908                "<p><a href='" . home_url() . "' target='_self' style='text-decoration:none;'>Ga terug naar de webshop</a></p>" :
    1909                ""
    1910            ) . "</div></body></html>";
     1916        $include_link ?
     1917            "<p><a href='" . home_url() . "' target='_self' style='text-decoration:none;'>Ga terug naar de webshop</a></p>" :
     1918            ""
     1919        ) . "</div></body></html>";
    19111920}
    19121921
  • bluem/trunk/composer.lock

    r2981398 r2989450  
    43384338    },
    43394339    "platform-dev": [],
    4340     "plugin-api-version": "2.3.0"
     4340    "plugin-api-version": "2.6.0"
    43414341}
  • bluem/trunk/gateways/Bluem_Bank_Based_Payment_Gateway.php

    r2981398 r2989450  
    197197        // Possible statuses: 'pending', 'processing', 'on-hold', 'completed', 'refunded, 'failed', 'cancelled',
    198198
    199         $order->update_status( 'pending', __( 'Awaiting Bluem Payment Signature', 'wc-gateway-bluem' ) );
     199        $order->update_status( 'pending', __( 'Awaiting Bluem Payment Signature', 'bluem' ) );
    200200
    201201        if ( isset( $response->PaymentTransactionResponse->TransactionURL ) ) {
    202             $order->add_order_note( __( "Betalingsproces geïnitieerd" ) );
     202            $order->add_order_note( __( "Betalingsproces geïnitieerd", 'bluem' ) );
    203203
    204204            $transactionID = "" . $response->PaymentTransactionResponse->TransactionID;
     
    280280                        // order is already marked as processing, nothing more is necessary
    281281                    } else if ( $order_status === "pending" ) {
    282                         $order->update_status( 'processing', __( 'Betaling is gelukt en goedgekeurd; via webhook', 'wc-gateway-bluem' ) );
     282                        $order->update_status( 'processing', __( 'Betaling is gelukt en goedgekeurd; via webhook', 'bluem' ) );
    283283                    }
    284284                } elseif ( $webhook_status === "Cancelled" ) {
    285                     $order->update_status('cancelled', __('Betaling is geannuleerd; via webhook', 'wc-gateway-bluem'));
     285                    $order->update_status('cancelled', __('Betaling is geannuleerd; via webhook', 'bluem'));
    286286                } elseif ( $webhook_status === "Open" || $webhook_status == "Pending" ) {
    287287                    // if the webhook is still open or pending, nothing has to be done yet
    288288                } elseif ( $webhook_status === "Expired" ) {
    289                     $order->update_status( 'failed', __( 'Betaling is verlopen; via webhook', 'wc-gateway-bluem' ) );
     289                    $order->update_status( 'failed', __( 'Betaling is verlopen; via webhook', 'bluem' ) );
    290290                } else {
    291                     $order->update_status( 'failed', __( 'Betaling is gefaald: fout of onbekende status; via webhook', 'wc-gateway-bluem' ) );
     291                    $order->update_status( 'failed', __( 'Betaling is gefaald: fout of onbekende status; via webhook', 'bluem' ) );
    292292                }
    293293                http_response_code(200);
     
    429429
    430430        if ( $statusCode === self::PAYMENT_STATUS_SUCCESS ) {
    431             $order->update_status( 'processing', __( 'Betaling is binnengekomen', 'wc-gateway-bluem' ) );
    432 
    433             $order->add_order_note( __( "Betalingsproces voltooid" ) );
     431            $order->update_status( 'processing', __( 'Payment has been received', 'bluem' ) );
     432
     433            $order->add_order_note( __( "Payment process completed", 'bluem' ) );
    434434
    435435            bluem_transaction_notification_email(
     
    443443            $this->thank_you_page( $order->get_id() );
    444444        } elseif ( $statusCode === self::PAYMENT_STATUS_FAILURE ) {
    445             $order->update_status( 'failed', __( 'Betaling is verlopen', 'wc-gateway-bluem' ) );
    446             $order->add_order_note( __( "Betalingsproces niet voltooid" ) );
     445            $order->update_status( 'failed', __( 'Payment has expired', 'bluem' ) );
     446            $order->add_order_note( __( "Payment process not completed", 'bluem' ) );
    447447            bluem_transaction_notification_email(
    448448                $request_from_db->id
     
    466466            exit;
    467467        } elseif ( $statusCode === "Cancelled" ) {
    468             $order->update_status( 'cancelled', __( 'Betaling is geannuleerd', 'wc-gateway-bluem' ) );
     468            $order->update_status( 'cancelled', __( 'Payment has been canceled', 'bluem' ) );
    469469
    470470
     
    484484            exit;
    485485        } elseif ( $statusCode === "Expired" ) {
    486             $order->update_status( 'failed', __( 'Betaling is verlopen', 'wc-gateway-bluem' ) );
     486            $order->update_status( 'failed', __( 'Payment has expired', 'bluem' ) );
    487487            bluem_transaction_notification_email(
    488488                $request_from_db->id
     
    492492            exit;
    493493        } else {
    494             $order->update_status( 'failed', __( 'Betaling is gefaald: fout of onbekende status', 'wc-gateway-bluem' ) );
     494            $order->update_status( 'failed', __( 'Payment failed: error or unknown status', 'bluem' ) );
    495495            bluem_transaction_notification_email(
    496496                $request_from_db->id
  • bluem/trunk/gateways/Bluem_CarteBancaire_Payment_Gateway.php

    r2841693 r2989450  
    99        parent::__construct(
    1010            'bluem_payments_cartebancaire',
    11             __('Bluem betalingen via Carte Bancaire'),
    12             __('Betaal gemakkelijk, snel en veilig via Carte Bancaire')
     11            __('Bluem payments via Carte Bancaire', 'bluem'),
     12            __('Pay easily, quickly and safely via Carte Bancaire', 'bluem')
    1313        );
    1414
  • bluem/trunk/gateways/Bluem_Creditcard_Payment_Gateway.php

    r2824418 r2989450  
    99        parent::__construct(
    1010            'bluem_payments_creditcard',
    11             __('Bluem betalingen via Credit Card'),
    12             __('Betaal gemakkelijk, snel en veilig via Credit Card'),
     11            __('Bluem payments via Credit Card', 'bluem'),
     12            __('Pay easily, quickly and safely via Credit Card', 'bluem'),
    1313            home_url( 'wc-api/bluem_payments_callback' )
    1414        );
  • bluem/trunk/gateways/Bluem_Mandates_Payment_Gateway.php

    r2981398 r2989450  
    422422        global $woocommerce;
    423423        $woocommerce->cart->empty_cart();
    424         $order->update_status( 'pending', __( 'Awaiting Bluem eMandate Signature', 'wc-gateway-bluem' ) );
     424        $order->update_status( 'pending', __( 'Awaiting Bluem eMandate Signature', 'bluem' ) );
    425425
    426426        if ( isset( $response->EMandateTransactionResponse->TransactionURL ) ) {
     
    573573                            $order->update_status(
    574574                                'processing',
    575                                 __(
    576                                     "Machtiging (Mandaat ID $mandateID) is gelukt en goedgekeurd; via webhook",
    577                                     'wc-gateway-bluem'
     575                                printf(
     576                                    __( 'Authorization (Mandate ID %s) was successful and approved; via webhook', 'bluem' ),
     577                                    $mandateID
    578578                                )
    579579                            );
     
    581581                    }
    582582                } elseif ( $webhook_status === "Cancelled" ) {
    583                     $order->update_status( 'cancelled', __( 'Machtiging is geannuleerd; via webhook', 'wc-gateway-bluem' ) );
     583                    $order->update_status( 'cancelled', __( 'Authorization has been canceled; via webhook', 'bluem' ) );
    584584                } elseif ($webhook_status === "Open" || $webhook_status == "Pending") {
    585585                    // if the webhook is still open or pending, nothing has to be done yet
    586586                } elseif ( $webhook_status === "Expired" ) {
    587                     $order->update_status( 'failed', __( 'Machtiging is verlopen; via webhook', 'wc-gateway-bluem' ) );
     587                    $order->update_status( 'failed', __( 'Authorization has expired; via webhook', 'bluem' ) );
    588588                } else {
    589                     $order->update_status( 'failed', __( 'Machtiging is gefaald: fout of onbekende status; via webhook', 'wc-gateway-bluem' ) );
     589                    $order->update_status( 'failed', __( 'Authorization failed: error or unknown status; via webhook', 'bluem' ) );
    590590                }
    591591                http_response_code(200);
     
    767767            $order->update_status(
    768768                'cancelled',
    769                 __( 'Machtiging is geannuleerd', 'wc-gateway-bluem' )
     769                __( 'Authorization has been canceled', 'bluem' )
    770770            );
    771771
     
    784784            $order->update_status(
    785785                'failed',
    786                 __(
    787                     'Machtiging is verlopen',
    788                     'wc-gateway-bluem'
    789                 )
     786                __('Authorization has expired', 'bluem')
    790787            );
    791788
     
    801798            $order->update_status(
    802799                'failed',
    803                 __(
    804                     'Machtiging is gefaald: fout of onbekende status',
    805                     'wc-gateway-bluem'
    806                 )
     800                __('Authorization failed: error or unknown status', 'bluem')
    807801            );
    808802            $errormessage = "Fout: Onbekende of foutieve status teruggekregen: {$statusCode}
     
    904898                    $successful_mandate = true;
    905899                } else if ( $block_processing ) {
    906                     $order->update_status( 'pending', __( 'Machtiging moet opnieuw ondertekend worden, want mandaat bedrag is te laag', 'wc-gateway-bluem' ) );
    907 
    908                     $url                     = $order->get_checkout_payment_url();
     900                    $order->update_status( 'pending', __( 'Authorization must be signed again because the mandate amount is too low', 'bluem' ) );
     901
     902                    $url = $order->get_checkout_payment_url();
    909903                    $order_total_plus_string = str_replace( ".", ",", ( "" . round( $order_total_plus, 2 ) ) );
    910904                    bluem_dialogs_render_prompt(
     
    924918The user is prompted to create a new mandate to fulfill this order."
    925919                    );
    926 
    927 
    928920                    exit;
    929921                }
     
    983975            $order->update_status(
    984976                'processing',
    985                 __(
    986                     "Machtiging (mandaat ID {$mandate_id}, verzoek ID {$request_id}
    987                         is gelukt en goedgekeurd",
    988                     'wc-gateway-bluem'
    989                 )
     977                printf(__('Authorization (Mandate ID %1$s, Request ID %2$s) has been obtained and approved', 'bluem'), $mandate_id, $request_id)
    990978            );
    991979
  • bluem/trunk/gateways/Bluem_PayPal_Payment_Gateway.php

    r2824418 r2989450  
    99        parent::__construct(
    1010            'bluem_payments_paypal',
    11             __('Bluem betalingen via PayPal'),
    12             __('Betaal gemakkelijk, snel en veilig via PayPal')
     11            __('Bluem payments via PayPal', 'bluem'),
     12            __('Pay easily, quickly and safely via PayPal', 'bluem')
    1313        );
    1414
  • bluem/trunk/gateways/Bluem_Payment_Gateway.php

    r2915532 r2989450  
    126126        $this->form_fields = apply_filters( 'wc_offline_form_fields', [
    127127            'enabled'     => [
    128                 'title'       => __('Inschakelen/uitschakelen'),
     128                'title'       => __('Enable/disable', 'bluem'),
    129129                'label'       => 'Enable '.$this->method_title,
    130130                'type'        => 'checkbox',
     
    133133            ],
    134134            'title'       => [
    135                 'title'       => __('Weergegeven titel'),
     135                'title'       => __('Displayed title', 'bluem'),
    136136                'type'        => 'text',
    137                 'description' => __('Dit is de titel die de gebruiker ziet bij het afrekenen.'),
     137                'description' => __('This is the title the user sees during checkout.', 'bluem'),
    138138                'default'     => $this->method_title,
    139139            ],
    140140            'description' => [
    141                 'title'       => __('Beschrijving'),
     141                'title'       => __('Description', 'bluem'),
    142142                'type'        => 'textarea',
    143                 'description' => __('Dit is de beschrijving die de gebruiker ziet tijdens het afrekenen.'),
     143                'description' => __('This is the description the user sees during checkout.', 'bluem'),
    144144                'default'     => $this->description
    145145            ]
  • bluem/trunk/gateways/Bluem_Sofort_Payment_Gateway.php

    r2841693 r2989450  
    99        parent::__construct(
    1010            'bluem_payments_sofort',
    11             __('Bluem betalingen via SOFORT'),
    12             __('Betaal gemakkelijk, snel en veilig via SOFORT')
     11            __('Bluem payments via SOFORT', 'bluem'),
     12            __('Pay easily, quickly and safely via SOFORT', 'bluem')
    1313        );
    1414
  • bluem/trunk/gateways/Bluem_iDEAL_Payment_Gateway.php

    r2915532 r2989450  
    1111        parent::__construct(
    1212            'bluem_payments_ideal',
    13             __('Bluem betalingen via iDEAL'),
    14             __('Betaal gemakkelijk, snel en veilig via iDEAL')
     13            __('Bluem payments via iDEAL', 'bluem'),
     14            __('Pay easily, quickly and safely via iDEAL', 'bluem')
    1515        );
    1616
     
    5656                'type' => 'select',
    5757                'required' => true,
    58                 'label' => 'Selecteer een bank:',
     58                'label' => __('Select a bank:', 'bluem'),
    5959                'options' => $options
    6060            ), '' );
  • bluem/trunk/readme.txt

    r2981419 r2989450  
    66Tested up to: 6.3
    77Requires PHP: 7.4
    8 Stable tag: 1.3.17.11
     8Stable tag: 1.3.17.12
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7676
    7777== Changelog ==
     78- 1.3.17.12: Stability fixes and improvements.
    7879- 1.3.17.11: Stability fixes.
    7980- 1.3.17.10: Updated eMandates BIC list in PHP library and webhook improvements.
  • bluem/trunk/vendor/composer/ClassLoader.php

    r2886890 r2989450  
    4646    private static $includeFile;
    4747
    48     /** @var ?string */
     48    /** @var string|null */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array[]
    54      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5554     */
    5655    private $prefixLengthsPsr4 = array();
    5756    /**
    58      * @var array[]
    59      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    6058     */
    6159    private $prefixDirsPsr4 = array();
    6260    /**
    63      * @var array[]
    64      * @psalm-var array<string, string>
     61     * @var list<string>
    6562     */
    6663    private $fallbackDirsPsr4 = array();
     
    6865    // PSR-0
    6966    /**
    70      * @var array[]
    71      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var array[]
    76      * @psalm-var array<string, string>
     75     * @var list<string>
    7776     */
    7877    private $fallbackDirsPsr0 = array();
     
    8281
    8382    /**
    84      * @var string[]
    85      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8684     */
    8785    private $classMap = array();
     
    9189
    9290    /**
    93      * @var bool[]
    94      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9592     */
    9693    private $missingClasses = array();
    9794
    98     /** @var ?string */
     95    /** @var string|null */
    9996    private $apcuPrefix;
    10097
    10198    /**
    102      * @var self[]
     99     * @var array<string, self>
    103100     */
    104101    private static $registeredLoaders = array();
    105102
    106103    /**
    107      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    108105     */
    109106    public function __construct($vendorDir = null)
     
    114111
    115112    /**
    116      * @return string[]
     113     * @return array<string, list<string>>
    117114     */
    118115    public function getPrefixes()
     
    126123
    127124    /**
    128      * @return array[]
    129      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    130126     */
    131127    public function getPrefixesPsr4()
     
    135131
    136132    /**
    137      * @return array[]
    138      * @psalm-return array<string, string>
     133     * @return list<string>
    139134     */
    140135    public function getFallbackDirs()
     
    144139
    145140    /**
    146      * @return array[]
    147      * @psalm-return array<string, string>
     141     * @return list<string>
    148142     */
    149143    public function getFallbackDirsPsr4()
     
    153147
    154148    /**
    155      * @return string[] Array of classname => path
    156      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    157150     */
    158151    public function getClassMap()
     
    162155
    163156    /**
    164      * @param string[] $classMap Class to filename map
    165      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    166158     *
    167159     * @return void
     
    180172     * appending or prepending to the ones previously set for this prefix.
    181173     *
    182      * @param string          $prefix  The prefix
    183      * @param string[]|string $paths   The PSR-0 root directories
    184      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    185177     *
    186178     * @return void
     
    188180    public function add($prefix, $paths, $prepend = false)
    189181    {
     182        $paths = (array) $paths;
    190183        if (!$prefix) {
    191184            if ($prepend) {
    192185                $this->fallbackDirsPsr0 = array_merge(
    193                     (array) $paths,
     186                    $paths,
    194187                    $this->fallbackDirsPsr0
    195188                );
     
    197190                $this->fallbackDirsPsr0 = array_merge(
    198191                    $this->fallbackDirsPsr0,
    199                     (array) $paths
     192                    $paths
    200193                );
    201194            }
     
    206199        $first = $prefix[0];
    207200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    208             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    209202
    210203            return;
     
    212205        if ($prepend) {
    213206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    214                 (array) $paths,
     207                $paths,
    215208                $this->prefixesPsr0[$first][$prefix]
    216209            );
     
    218211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    219212                $this->prefixesPsr0[$first][$prefix],
    220                 (array) $paths
     213                $paths
    221214            );
    222215        }
     
    227220     * appending or prepending to the ones previously set for this namespace.
    228221     *
    229      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    230      * @param string[]|string $paths   The PSR-4 base directories
    231      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    232225     *
    233226     * @throws \InvalidArgumentException
     
    237230    public function addPsr4($prefix, $paths, $prepend = false)
    238231    {
     232        $paths = (array) $paths;
    239233        if (!$prefix) {
    240234            // Register directories for the root namespace.
    241235            if ($prepend) {
    242236                $this->fallbackDirsPsr4 = array_merge(
    243                     (array) $paths,
     237                    $paths,
    244238                    $this->fallbackDirsPsr4
    245239                );
     
    247241                $this->fallbackDirsPsr4 = array_merge(
    248242                    $this->fallbackDirsPsr4,
    249                     (array) $paths
     243                    $paths
    250244                );
    251245            }
     
    257251            }
    258252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    259             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    260254        } elseif ($prepend) {
    261255            // Prepend directories for an already registered namespace.
    262256            $this->prefixDirsPsr4[$prefix] = array_merge(
    263                 (array) $paths,
     257                $paths,
    264258                $this->prefixDirsPsr4[$prefix]
    265259            );
     
    268262            $this->prefixDirsPsr4[$prefix] = array_merge(
    269263                $this->prefixDirsPsr4[$prefix],
    270                 (array) $paths
     264                $paths
    271265            );
    272266        }
     
    277271     * replacing any others previously set for this prefix.
    278272     *
    279      * @param string          $prefix The prefix
    280      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    281275     *
    282276     * @return void
     
    295289     * replacing any others previously set for this namespace.
    296290     *
    297      * @param string          $prefix The prefix/namespace, with trailing '\\'
    298      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    299293     *
    300294     * @throws \InvalidArgumentException
     
    482476
    483477    /**
    484      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    485      *
    486      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    487481     */
    488482    public static function getRegisteredLoaders()
  • bluem/trunk/views/home.php

    r2959619 r2989450  
    3939    <p><strong>Plugin versie</strong><br />Versie <?php $bluem = get_plugin_data( WP_PLUGIN_DIR . '/bluem/bluem.php' ); echo $bluem['Version']; ?> (<a href="<?php echo admin_url('plugin-install.php?tab=plugin-information&plugin=bluem&TB_iframe=true&width=600&height=550'); ?>" target="_blank">Details bekijken</a>)</p>
    4040
    41     <p><strong>Technische informatie</strong><br />WordPress versie: <?php echo get_bloginfo('version'); ?><br />WooCommerce versie: <?php echo class_exists('WooCommerce') ? WC()->version : __('WooCommerce niet geinstalleerd.', 'bluem-woocommerce'); ?><br />Bluem PHP-library versie: <?php echo $dependency_bluem_php_version; ?><br />PHP versie: <?php echo phpversion(); ?></p>
     41    <p><strong>Technische informatie</strong><br />WordPress versie: <?php echo get_bloginfo('version'); ?><br />WooCommerce versie: <?php echo class_exists('WooCommerce') ? WC()->version : __('WooCommerce not installed', 'bluem'); ?><br />Bluem PHP-library versie: <?php echo $dependency_bluem_php_version; ?><br />PHP versie: <?php echo phpversion(); ?></p>
    4242
    4343    <?php bluem_render_footer(); ?>
  • bluem/trunk/views/settings.php

    r2959619 r2989450  
    7777
    7878            <div style="margin-top: 0; padding-top: 25px; border-top: 1px solid #2b4e6c;">
    79                 <input name="submit" class="button button-primary" type="submit" value="<?php esc_attr_e( 'Wijzigingen opslaan' ); ?>" />
     79                <input name="submit" class="button button-primary" type="submit" value="<?php esc_attr_e( 'Save changes', 'bluem' ); ?>" />
    8080            </div>
    8181        </form>
Note: See TracChangeset for help on using the changeset viewer.