Forum Replies Created

Viewing 15 posts - 31 through 45 (of 48 total)
  • Author
    Posts
  • Jonathan Moore
    Participant

    I only noticed the curl once, but I’ve been getting some strange behaviour about once every couple of days and WJECF is always in the set of errors logged. No doubt it’s not WJECF, I’m just checking every angle for clues.

    [15-Mar-2018 14:57:13 UTC] PHP Fatal error: Maximum execution time of 120 seconds exceeded in public_html/wp-content/plugins/woocommerce-auto-added-coupons-pro/includes/WJECF_Wrap.php on line 26

    I didn’t realise about those debug settings, that’s very interesting thanks.

    in reply to: Undefined index: key in WJECF_WC.php line 88 #2314
    Jonathan Moore
    Participant

    Yes maybe it was the display rather than not being in the basket

    in reply to: Get coupon description using WC_Coupon::get_description() #2297
    Jonathan Moore
    Participant

    that was with WooCommerce 3.2.1
    The same applies to the latest Coupons 2.6.0.2

    Coupon description comes from the excerpt field and since you are using $post->post_excerpt; rather than woocommerce api the woocommerce filters won’t be called

    in reply to: Automatically add the coupon BUG #2244
    Jonathan Moore
    Participant

    >If you want a ‘first order’-only coupon, this option has been added in the development version of 2.6.

    A first order coupon is already supported in earlier versions by using an autocoupon with Usage limit per user=1 (and say minimum spend=1 which ensures that the coupon is removed when you remove the last paid item from the cart)..
    .. at least I use that and it seems to work

    in reply to: Remove free item from cart #2225
    Jonathan Moore
    Participant

    I realised I had another variant on this, when removing the last item from cart, a free item was getting left behind and in fact there was no way for the user to remove it. There is a simple workaround which is to add a minimum spend on the coupon for the free item, at which point the free item is then removed automatically.

    This is on woo3.1.2 (3.2.x is still getting too many patches and breaks too many other things) and WooCommerce Extended Coupon Features PRO v2.5.3 and 2.5.5 (tested both)

    in reply to: Why is wjecf-free-products.js needed on every page load? #1730
    Jonathan Moore
    Participant

    done as:

    
    if ( (!is_cart()) && ( !is_checkout()) ){
        wp_dequeue_style('wjecf-style');
        wp_dequeue_script('wjecf-free-products');
    }
    

    though it would be more efficient to change the code to not enqueue them where not needed…

    in reply to: Polylang Implementation #1702
    Jonathan Moore
    Participant

    received with thanks,
    I also have very limited time for testing, however I did already test and put into production the get_description() change and this seems to be working fine

    in reply to: Add a coupon that adds a coupon #1697
    Jonathan Moore
    Participant

    Yes I already do some of this.
    but this sort of hard-coded stuff would very easily get out of date with changes to coupons made by the shop manager.

    Actually I think it should be quite easy to do some sort of enhancement with the plugin. I mean it seems crazy to write extra code to auto-add a coupon when the auto-add coupons already has all the logic for this.

    For the theme code, instead of echo, use wc_add_notice() for a separate message, or simply implement as:

    function my_check_offers($message, $products )
    {
    //check products added and add new coupons or messages
    return $message;
    }
    add_filter( ‘wc_add_to_cart_message_html’, ‘my_check_offers’, 10, 2);

    in reply to: Polylang Implementation #1669
    Jonathan Moore
    Participant

    This is the non-commercial Hyyan WooCommerce Polylang Integration rather than the new Polylang commercial extension for WooCommerce, but the principles should be the same.

    Coupons were not created as separate posts but Products are, and Terms etc are translated.

    I’ve just checked in the coupons extension into this branch – there’s a coupons.php file:
    https://github.com/hyyan/woo-poly-integration/tree/1.0.2
    Note also documentation:
    https://github.com/hyyan/woo-poly-integration/wiki

    I just took a quick look at WJECF_WPML.php now you mentioned it, and I think it’s already covered within the woo-poly-integration 1.0.2 but your feedback/suggestions welcome.

    in reply to: Polylang Implementation #1666
    Jonathan Moore
    Participant

    yeah, of course that should work too.. 🙂

    in reply to: Polylang Implementation #1664
    Jonathan Moore
    Participant

    so it would be a simple change:

    `
    private function coupon_excerpt($coupon) {
    $my_post = get_post( WJECF_Wrap( $coupon )->get_id() );
    return apply_filters( ‘woocommerce_coupon_get_description’,
    __( $my_post->post_excerpt, ‘woocommerce-jos-autocoupon’ ), $coupon );
    }
    `

    I’ve just tested this and working fine..

    in reply to: Polylang Implementation #1663
    Jonathan Moore
    Participant

    actually no, it should just use the existing filter woocommerce_coupon_get_description

    the description is the excerpt and all the woo3 get() functions are filterable in this way (in fact I already implemented this one)

    in reply to: Polylang Implementation #1662
    Jonathan Moore
    Participant

    ooo yes, nice one, that’s a very standard and filterable function, good point 🙂

    in reply to: Allow applying when invalid #1642
    Jonathan Moore
    Participant

    It seems to be working now, I’m not sure whether it was due to a particular combination of settings or solved by fixes applied from other threads.
    Please close, I won’t raise any more unless there’s a case repeatable in limited test environment.

    in reply to: cheapest_product / every_nth_item query #1641
    Jonathan Moore
    Participant

    hmmm that gives PHP Parse error: syntax error, unexpected ‘->’ (T_OBJECT_OPERATOR)

    Probably it should be:

    
    if ( $wrap_coupon->is_type( WJECF_WC()->wc_get_cart_coupon_types() ) ) {
    

    that seems to work well.

Viewing 15 posts - 31 through 45 (of 48 total)