Forum Replies Created

Viewing 15 posts - 1,651 through 1,665 (of 1,876 total)
  • Author
    Posts
  • in reply to: On staging site error with plug in #1437
    Soft79
    Keymaster

    2.5.2.2 should work fine with your PHP version.

    in reply to: Regular and Sale price in the Cart. #1436
    Soft79
    Keymaster

    Yes, this can be done using the following snippet in functions.php.

    But:
    – The snippet does not respect the tax display settings of WooCommerce
    – The subtotal below the cart will still display the undiscounted subtotal

    
    add_filter( 'woocommerce_cart_item_subtotal',
      function( $price, $values ) {
        if ( ! isset( $values['line_subtotal'], $values['line_total'] ) ) return $price;
    
        $regular_price = $values['line_subtotal'] + $values['line_subtotal_tax'];
        $sale_price = $values['line_total'] + $values['line_tax'];
    
        $price = '<del>' . ( is_numeric( $regular_price ) ? wc_price( $regular_price ) : $regular_price ) . '</del> <ins>' . ( is_numeric( $sale_price ) ? wc_price( $sale_price ) : $sale_price ) . '</ins>';
    		
        return $price;
      },
    10, 2);
    
    in reply to: Apply coupon based on purchase history #1435
    Soft79
    Keymaster

    Not out of the box.

    If the user is logged in, then it’s not too difficult to create a custom script for it. Otherwise it will be more difficult.

    in reply to: Broken documentation link #1434
    Soft79
    Keymaster

    Yes, you’re right I didn’t notice it. Fixed it in 2.5.2.2.

    in reply to: feature request: Disallowed Customers #1425
    Soft79
    Keymaster

    Hi Szilvia,

    currently it’s not on the roadmap, but if you’re PHP savvy, it’s quite easy to create a plugin yourself, please have a look at the example at https://www.soft79.nl/documentation/wjecf/#!/api.

    in reply to: Trouble with FREE PRODUCT #1424
    Soft79
    Keymaster

    Hi Bas,

    I see what you mean. Please upgrade to 2.5.2.1 which fixes the issue.

    Hi Bas,

    can you please explain me the problem you were having?

    in reply to: BOGO and Role Based total price calculation conflict #1423
    Soft79
    Keymaster

    I just released v2.5.2. Is the problem solved in 2.5.2?

    in reply to: API documentation #1417
    Soft79
    Keymaster

    I just updated the documentation.

    https://www.soft79.nl/documentation/wjecf/#!/api

    It’s still a work in progress, but it covers most.

    in reply to: API documentation #1416
    Soft79
    Keymaster

    Hi Eugeneus,

    Yes, you’re right the documentation still has to be written….

    In a nutshell:

    • The API functions are in the file WJECF_Pro_API.php, and examples on how to use them are in wjecf-pro-api-example.php
    • If you would like to build your own extra functionality for this plugin, hook into the wjecf_init_plugins-action. Then create a class that extends Abstract_WJECF_Plugin and load it by calling WJECF()->add_plugin( 'NameOfYourClass');
      • Create a function init_hook(), where you setup your plugin and define frontend hooks.
      • Create a function init_admin_hook(), where you setup your plugin for admin usage and define admin hooks.
      • If you would like to add admin fields, you can use the WooCommerce functions (like woocommerce_wp_text_input) for that, for example by hooking into the woocommerce_coupon_options_usage_restriction action, you can add fields to the Usage Restrictions tab. Or use one of these actions for my plugin: wjecf_coupon_metabox_checkout, wjecf_coupon_metabox_customer, wjecf_coupon_metabox_misc, wjecf_coupon_metabox_free_products.
      • For version 2.5.1+ create a function admin_coupon_meta_fields( $coupon ), and make it return an array [ 'field_name' => 'sanitation', ... ] . Upon saving a coupon, these fields will be automatically read from $_POST and sanitized with the given sanition method, e.g. 'int', 'int[]', 'yesno', 'decimal', 'clean' or even a callback: [ 'callback' => callback ] and saved to the current coupon. For versions prior to 2.5.1, you need to handle process_shop_coupon_meta yourself.
    • These are currently the available filters:
      • apply_filters( 'wjecf_bogo_product_amount_for_coupon', $qty, $coupon )
      • apply_filters( 'wjecf_set_free_product_amount_in_cart', $quantity, $product )
      • apply_filters( 'wjecf_free_product_amount_for_coupon', $coupon_qty, $coupon )
      • apply_filters( 'wjecf_free_cart_item_price', __('Free!', 'woocommerce'), $price_html, $cart_item, $cart_item_key )
      • apply_filters( 'wjecf_free_cart_item_subtotal', __('Free!', 'woocommerce'), $price_html, $cart_item, $cart_item_key )
      • apply_filters( 'wjecf_coupon_can_be_applied', $can_be_applied, $coupon )
      • apply_filters( 'wjecf_coupon_has_a_value', $has_a_value, $coupon )

    If you have any questions, just let me know.

    in reply to: Can't Install – fatal error. #1398
    Soft79
    Keymaster

    Are coupons enabled in WooCommerce?

    WooCommerce > Settings > Checkout > Enable the use of Coupons

    in reply to: Can't Install – fatal error. #1395
    Soft79
    Keymaster

    Maoz,

    please download version 2.5.1-b5 from your account page and let me know if that version works for you.

    (I’ve tested that version with PHP 5.3 and PHP 7.0 in combination with WooCommerce 2.6 and 3.0)

    in reply to: Can't Install – fatal error. #1388
    Soft79
    Keymaster

    Please consult your hosting provider. I will try to make the next release compatible with outdated php versions, but it will take a couple of days.

    in reply to: Can't Install – fatal error. #1386
    Soft79
    Keymaster

    Hi,

    Can you upgrade your PHP to 5.5 or newer?

    in reply to: How do I use the License Key? #1381
    Soft79
    Keymaster

    Hi Fredy,

    In the current version you can’t yet enter the licence key. This will be added in a later version, and it will allow for automatic updates. You’ll be notified when this version is released.

    Soft79
    Keymaster

    Yes, I’ve received it. I’ll get back to you.

Viewing 15 posts - 1,651 through 1,665 (of 1,876 total)