Forum Replies Created

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter ssoares

    (@ssoares)

    Thanks for your help!.
    I’m new to WP and these things are not obvious for me.
    With a friend’s help, I succeeded to use the dp_duplicate_post as suggested.

    Thread Starter ssoares

    (@ssoares)

    Sorry, I’m not sure I’m the best suited to help you. I’m a newbie with wordpress and I didn’t find a solution to my previous problem. I made an “ugly” workaround to solve my problem with WPML.
    My first attempt worked except with languages. I defined my function for the custom shortcut for Mailpoet, see previous post, and then I have done my queries in my function to fetch data.
    My code was really basic :

    $args     = array(
        'post_type'      => 'movie',
        'meta_key'       => 'wpcf-flag-vendredi',
        'orderby'        => 'meta_value_num',
        'posts_per_page' => 9,
        'order'          => 'ASC',
        'meta_query'     => array(
            array(
                'key'     => 'wpcf-flag-vendredi',
                'value'   => array(1),
                'compare' => 'IN',
            ),
        ),
    );

    And after I made my loop.
    You may open your own ticket and give more details about your problem.

    Thread Starter ssoares

    (@ssoares)

    Ok, I made some tests and I was doing something wrong but now I can send it once.
    I have to copy the newsletter and then configure it in order to send it again.
    Is it possible to send the newsletter without doing a copy manually?
    Does the premium version allow this?

    Thread Starter ssoares

    (@ssoares)

    Hello,
    I succeed to customize the data displayed in my newsletter with the custom post type.
    The only problem remainig is that my post type movie is not included in the WP_Query to filter the post bay language with wpml.

    ... AND ((t.language_code = 'fr' AND wp_posts.post_type IN ('post' , 'page', 'movie'))
    OR wp_posts.post_type NOT IN ('post' , 'page',  'movie', 'slider'))...

    This is what I need but the query when my script is called in the mailpoet_shortcodes_custom_filter returns :

    AND ((t.language_code = 'fr' AND wp_posts.post_type IN ('post' , 'page')) 
    OR wp_posts.post_type NOT IN ('post' , 'page'))

    I tried this before calling my function : post_type_exists(‘movie’) and it returns false.
    Any idea? What is happening?

    Thanks.

    • This reply was modified 9 years ago by ssoares.
    • This reply was modified 9 years ago by ssoares.
    Thread Starter ssoares

    (@ssoares)

    I found out what was responsible for the message output thanks to your last message.

    xdebug.show_exception_trace
    Type: integer, Default value: 0

    When this setting is set to 1, Xdebug will show a stack trace whenever an Exception or Error is raised – even if this Exception or Error is actually caught.

    My xdebug was configured with xdebug.show_exception_trace = on. It could make sense in some case but I’m not sure I need this information so I turned it off and it’s ok. If I need, in other projects, the error message to be displayed I will have to defined it in the catch part where it is needed.
    It just better for my error management.

    Thanks for your help and I apologize for the waste of time.

    Thread Starter ssoares

    (@ssoares)

    Yes, I will do some test and try the plugin on an other server to find out if it’s a server configuration problem.
    And you are right, this occurs with others catch blocks. I assumed it was related to the missing data.
    I have already done some research and that’s why I’ve decided to contact the support.
    I’m not sure I will / can do that on my day of work.
    It’s not a problem if no errors are displayed so I can’t justify the time to investigate but I will let you know about what I found.

    Thread Starter ssoares

    (@ssoares)

    I have disabled opcache and the problem still occurs.
    I will give a try to the stable version of opcache.

    Thread Starter ssoares

    (@ssoares)

    I forgot this :
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

    Thread Starter ssoares

    (@ssoares)

    My PHP version is
    PHP Version 5.6.30-7+deb.sury.org~xenial+1
    FPM/FastCGI
    Linux stg 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64

    Thread Starter ssoares

    (@ssoares)

    I have WP : 4.7.4 et Loco Translate 2.0.13.
    I tried with the 1.x and no error messages were shown.

    Thread Starter ssoares

    (@ssoares)

    I’ve got this message just after I insralled the plugin.
    I assumed that there was no data in the DB.

    I tried to disable other plugins and theres was only two errors.

    Maybe this info could help: the $data is false after the fetch :
    $key = ‘loco_’.$this->getKey();
    $data = get_option( $key );
    The loco_xxxxx are not in the DB, I just installed the plugin.

    Thread Starter ssoares

    (@ssoares)

    Hello.
    Thanks for your link.
    I will try this. I’m still waiting a validation for this project.

    Thread Starter ssoares

    (@ssoares)

    I’ve found something with the code of someone else..
    I can add a new custom field for the special price.
    In my functions.php, I will add a function to add my custom price. I will retrieve the product data with the product id in the cart, get the custom field value and do the calculation.
    After that, with $woocommerce->cart->add_fee I add a new row after the subtotal.
    I will have to hard code the value of percentage (?) but not such a big deal.
    It’s not exactly what I want but it will be Ok.

    • This reply was modified 9 years, 7 months ago by ssoares.
Viewing 13 replies - 1 through 13 (of 13 total)