Plugin Directory

Changeset 2703760


Ignore:
Timestamp:
04/02/2022 06:25:30 PM (4 years ago)
Author:
jaycodez
Message:

Update to version 1.4.2 from GitHub

Location:
woominecraft
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • woominecraft/tags/1.4.2/includes/order-manager.php

    r2669487 r2703760  
    33namespace WooMinecraft\Orders\Manager;
    44
    5 use function WooMinecraft\Helpers\wmc_items_have_commands;
    65use function WooMinecraft\Orders\Cache\bust_command_cache;
    76
     
    1716    add_action( 'woocommerce_before_checkout_billing_form', $n( 'additional_checkout_field' ) );
    1817    add_action( 'woocommerce_thankyou', $n( 'thanks' ) );
    19     add_action( 'woocommerce_checkout_process', $n( 'require_fields' ) );
    20 }
    21 
    22 /**
    23  * Makes sure some fields are set up properly.
    24  */
    25 function require_fields() {
    26     global $woocommerce;
    27 
    28     if ( ! $woocommerce instanceof \WooCommerce ) {
    29         return;
    30     }
    31 
    32     $items = $woocommerce->cart->cart_contents;
    33     if ( ! wmc_items_have_commands( $items ) ) {
    34         return;
    35     }
    36 
    37     $player_id = isset( $_POST['player_id'] ) ? sanitize_text_field( $_POST['player_id'] ) : false; // @codingStandardsIgnoreLine No nonce needed.
    38     if ( ! $player_id ) {
    39         wc_add_notice( __( 'You MUST provide a Minecraft username.', 'woominecraft' ), 'error' );
    40         return;
    41     }
    4218}
    4319
     
    10783function additional_checkout_field( $cart ) {
    10884    $items = WC()->cart->cart_contents;
    109     if ( ! wmc_items_have_commands( $items ) || ! function_exists( 'woocommerce_form_field' ) ) {
     85    if ( ! \WooMinecraft\Helpers\wmc_items_have_commands( $items ) || ! function_exists( 'woocommerce_form_field' ) ) {
    11086        return false;
    11187    }
  • woominecraft/tags/1.4.2/readme.txt

    r2669487 r2703760  
    44Requires at least: 4.4.2
    55Tested up to: 5.8.2
    6 Stable tag: 1.4.3
     6Stable tag: 1.4.2
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    5555
    5656== Changelog ==
    57 
    58 = 1.4.3 =
    59 * Deployment changes ( dev-related )
    60 * Adds a check in the checkout sequence for when suer leaves Player field blank.
    6157
    6258= 1.4.1 =
  • woominecraft/tags/1.4.2/woominecraft.php

    r2669487 r2703760  
    55Description: A WooCommerce plugin which allows donations and commands to be sent to your Minecraft server.
    66Author: Jerry Wood
    7 Version: 1.4.3
     7Version: 1.4.2
    88License: GPLv2
    99Text Domain: woominecraft
     
    1818define( 'WMC_INCLUDES', plugin_dir_path( __FILE__ ) . 'includes/' );
    1919define( 'WMC_URL', plugin_dir_url( __FILE__ ) );
    20 define( 'WMC_VERSION', '1.4.3' );
     20define( 'WMC_VERSION', '1.4.2' );
    2121
    2222// Require the helpers file, for use in :allthethings:
  • woominecraft/trunk/includes/order-manager.php

    r2669487 r2703760  
    33namespace WooMinecraft\Orders\Manager;
    44
    5 use function WooMinecraft\Helpers\wmc_items_have_commands;
    65use function WooMinecraft\Orders\Cache\bust_command_cache;
    76
     
    1716    add_action( 'woocommerce_before_checkout_billing_form', $n( 'additional_checkout_field' ) );
    1817    add_action( 'woocommerce_thankyou', $n( 'thanks' ) );
    19     add_action( 'woocommerce_checkout_process', $n( 'require_fields' ) );
    20 }
    21 
    22 /**
    23  * Makes sure some fields are set up properly.
    24  */
    25 function require_fields() {
    26     global $woocommerce;
    27 
    28     if ( ! $woocommerce instanceof \WooCommerce ) {
    29         return;
    30     }
    31 
    32     $items = $woocommerce->cart->cart_contents;
    33     if ( ! wmc_items_have_commands( $items ) ) {
    34         return;
    35     }
    36 
    37     $player_id = isset( $_POST['player_id'] ) ? sanitize_text_field( $_POST['player_id'] ) : false; // @codingStandardsIgnoreLine No nonce needed.
    38     if ( ! $player_id ) {
    39         wc_add_notice( __( 'You MUST provide a Minecraft username.', 'woominecraft' ), 'error' );
    40         return;
    41     }
    4218}
    4319
     
    10783function additional_checkout_field( $cart ) {
    10884    $items = WC()->cart->cart_contents;
    109     if ( ! wmc_items_have_commands( $items ) || ! function_exists( 'woocommerce_form_field' ) ) {
     85    if ( ! \WooMinecraft\Helpers\wmc_items_have_commands( $items ) || ! function_exists( 'woocommerce_form_field' ) ) {
    11086        return false;
    11187    }
  • woominecraft/trunk/readme.txt

    r2669487 r2703760  
    44Requires at least: 4.4.2
    55Tested up to: 5.8.2
    6 Stable tag: 1.4.3
     6Stable tag: 1.4.2
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    5555
    5656== Changelog ==
    57 
    58 = 1.4.3 =
    59 * Deployment changes ( dev-related )
    60 * Adds a check in the checkout sequence for when suer leaves Player field blank.
    6157
    6258= 1.4.1 =
  • woominecraft/trunk/woominecraft.php

    r2669487 r2703760  
    55Description: A WooCommerce plugin which allows donations and commands to be sent to your Minecraft server.
    66Author: Jerry Wood
    7 Version: 1.4.3
     7Version: 1.4.2
    88License: GPLv2
    99Text Domain: woominecraft
     
    1818define( 'WMC_INCLUDES', plugin_dir_path( __FILE__ ) . 'includes/' );
    1919define( 'WMC_URL', plugin_dir_url( __FILE__ ) );
    20 define( 'WMC_VERSION', '1.4.3' );
     20define( 'WMC_VERSION', '1.4.2' );
    2121
    2222// Require the helpers file, for use in :allthethings:
Note: See TracChangeset for help on using the changeset viewer.