Forum Replies Created

Viewing 15 replies - 1 through 15 (of 24 total)
  • John Powell

    (@digipark)

    Same issue here. Have disabled Yoast and will watch for update(s).

    Thread Starter John Powell

    (@digipark)

    And I think I finally found it… woocommerce_order_note_added

    Thread Starter John Powell

    (@digipark)

    André,
    Thanks for your reply. I’m not trying to create a custom email, and don’t need assistance with the action I’m wanting to do. The issue is trying to find the right Woocommerce hook to perform a count of the comments for an order in progress.

    Wunderautomation looks like it has the trigger I’m looking for but I would think they are just using existing Woocommerce hooks. In their TRIGGERS section it shows this…

    Comment: Submitted, Approved, Status changed, WooCommerce order note submitted

    That’s exactly where I’m trying to hook in… when a “WooCommerce order note submitted”. Every time an order note is automatically submitted, I want this to run. For example, when an order changes status, a note is added. When a credit card is successfully processed, or when it fails, a note is added. That’s when I need to hook in… every time an order note is added by some admin process.

    Thanks…
    John

    Thread Starter John Powell

    (@digipark)

    Thanks for your reply Juan. I’d seen that very article on Stackoverflow but I think it’s for adding a note, not being triggered when a note is added by something else. What I’m trying to do is be notified or perform an action when the note count reaches a threshold. I know how to count the number of notes on an order… got that piece figured out. I just need to figure out when a new note is added so I can perform a function at that point. Does this make more sense?

    Thanks again…
    John

    Thread Starter John Powell

    (@digipark)

    Hi Greg… I’ll email two screenshots to you.

    Thanks…
    John M Powell
    Digipark.com

    Thread Starter John Powell

    (@digipark)

    Thanks Greg. I just sent a request on your contact work. Agreed I saw the user_id = 1 which would be doing it. I don’t know the code above it but my guess is there’s a query to get the previously inserted user record and something doesn’t pull up correctly so it ends up with ‘1’.

    Nickname seems to be the only thing changing. We never lose Admin role on user id 1.

    Thanks!
    John

    Thread Starter John Powell

    (@digipark)

    Hi Greg. I hope you enjoyed your Independence Day. I took my son on a 2 week trip and am finally starting to catch up on work.

    So I did a query logger and found more info for you. I haven’t tested every situation you listed in #1 but it definitely happened on the first test I did, which was a new user checking the ‘create account’ box. I think you’ll see what is happening in the queries I captured.

    INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES (39754, ‘adverts_person’, ‘Test Person’) – (0.00095415115356445 s)
    [Stack]: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/x/woocommerce.php’), x_get_view, X_View_Router::render, include(‘/themes/x/framework/views/integrity/woocommerce.php’), woocommerce_content, wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, WC_Structured_Data->generate_product_data, do_shortcode, preg_replace_callback, do_shortcode_tag, shortcode_adverts_add, Adverts_Shortcode_Adverts_Add->main, Adverts_Shortcode_Adverts_Add->action_preview, Adverts_Post::save, adverts_save_single, update_post_meta, update_metadata, add_metadata

    INSERT INTO wp_postmeta (post_id, meta_key, meta_value) VALUES (39755, ‘adverts_person’, ‘Test Person’) – (0.0013630390167236 s)
    [Stack]: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/x/woocommerce.php’), x_get_view, X_View_Router::render, include(‘/themes/x/framework/views/integrity/woocommerce.php’), woocommerce_content, wc_get_template_part, load_template, require(‘/plugins/woocommerce/templates/content-single-product.php’), do_action(‘woocommerce_after_single_product_summary’), WP_Hook->do_action, WP_Hook->apply_filters, woocommerce_output_product_data_tabs, wc_get_template, include(‘/themes/x/woocommerce/single-product/tabs/tabs.php’), woocommerce_product_description_tab, wc_get_template, include(‘/plugins/woocommerce/templates/single-product/tabs/description.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, shortcode_adverts_add, Adverts_Shortcode_Adverts_Add->main, Adverts_Shortcode_Adverts_Add->action_preview, Adverts_Post::save, adverts_save_single, update_post_meta, update_metadata, add_metadata

    UPDATE wp_users SET user_pass = ‘##REMOVED##’, user_nicename = ‘admin’, user_email = ‘[email protected]’, user_url = ”, user_registered = ‘2015-11-23 08:09:29’, user_activation_key = ”, display_name = ‘Test Person’ WHERE ID = 1 – (0.00020790100097656 s)
    [Stack]: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, adext_wc_payments_cart_redirect, adverts_create_user_from_post_id, apply_filters(‘adverts_create_user_from_post_id’), WP_Hook->apply_filters, _adverts_create_user_from_post_id, wp_update_user, wp_insert_user

    UPDATE wp_usermeta SET meta_value = ‘Test Person’ WHERE user_id = 1 AND meta_key = ‘nickname’ – (0.0012691020965576 s)
    [Stack]: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, adext_wc_payments_cart_redirect, adverts_create_user_from_post_id, apply_filters(‘adverts_create_user_from_post_id’), WP_Hook->apply_filters, _adverts_create_user_from_post_id, wp_update_user, wp_insert_user, update_user_meta, update_metadata

    There are a number of UPDATE wp_usermeta’s after this which include ‘Test Person’ but they are massive and I believe the issue is already shown in the above queries.

    I hope this is enough info for you to figure out where the issue is. Thanks!

    John M Powell
    Digipark.com

    Thread Starter John Powell

    (@digipark)

    Greg,

    Yes – [adverts_add form_scheme=”classifieds-package-1″]

    When customers create an ad is when it appears to happen. It looks like it is taking a custom field and setting that as the root WP admin ‘NIckname’ and ‘Display name publicly as’ name. Changing that field after an ad has been posted does not appear to change it again.

    We have the following modules installed/enabled…
    WooCommerce Payments
    Custom Fields
    Emails
    reCAPTCHA
    Category Icons
    Mark As Sold

    I have other modules installed but not activated.

    Thread Starter John Powell

    (@digipark)

    Hi Greg,

    Core is on 1.4.5. The only update I see available in Plugins is WooCommerce Payments from 1.6.0 to 1.6.1.

    Thanks…
    John

    Thread Starter John Powell

    (@digipark)

    Greg,

    Thanks for the code. That wasn’t exactly what I needed but it got me to where I was going. The renewal packages (or listing types I should say) are different post ID’s than the original listing purchase. Once I realized what was going on, I adjusted the ID comparison to cross-reference the original with the renewal and it’s working beautifully.
    if( ($type == 37793) && ($p->ID == 37901) ) { $limit[] = $p; }

    Thank you very much for the assistance. One other little thing to resolve and then I’ll be launching the updated ads management and looking for the next project. ??

    John M Powell
    Digipark.com

    Thread Starter John Powell

    (@digipark)

    Found where to get the latest templates but have not been able to figure out how to filter the renewal package to the one appropriate for the ad being renewed. Dug through the documents but not seeing a way to do this. Any suggestions?

    Thanks…
    John

    Thread Starter John Powell

    (@digipark)

    Greg,

    That’s funny. No, it wasn’t a stupid question. That was exactly the problem.

    I’ve just discovered I’m using 4 year old templates which is probably not helpful so I need to find where the most current ones are. I think I figured out the renew page is using form.php but I need to get that updated and figure out how to only select (or better yet, only display) the same renewal package as what they originally purchased. Once I get that coded I think it’s ready to launch, at least until your subscription module is ready. ??

    Thanks…
    John M Powell
    Digipark.com

    Thread Starter John Powell

    (@digipark)

    I forgot to mention I got the phone/email issue resolved… one step closer to launch. ??

    Thread Starter John Powell

    (@digipark)

    Greg,

    Thanks again for your help!

      WooCommerce Payments

    • Renewal Options checked (allow using purchased advert single packages)
    • Preselect Pricings not checked
    • Default Pricing (nothing selected)
    • Default Renewal Pricing (currently this is set to a package but I’ve tried it with nothing selected also)
    • Hold For Moderation (none of the options are checked)
      Mark As Sold

    • There was a adverts_form_load and adverts_form_bind being used but I commented them out and it made no difference. What variables are used for the Mark As Sold module? Maybe I can pull those into the templates in a child theme?
      RENEW AD issue

    • DEBUG didn’t help. There wasn’t any error shown. On https://test.cdaonline.org/my-account/my-classifieds/?advert_renew=37899 (when logged in) I see the page title “My Classifieds”, the account buttons (DASHBOARD, ORDERS, etc), and a single red asterisk as the page content and then the bottom of the div, footer, etc. Everything looks normal except there is nothing on the renew page to see. Here’s the HTML (there were lots of line breaks I removed from the html below);

    <div class=”woocommerce-MyAccount-content”>
    <div class=”woocommerce-notices-wrapper”></div>
    <form action=”” method=”post” class=”adverts-form adverts-form-aligned”>
    <fieldset>
    <input type=”hidden” name=”_adverts_renew” id=”_adverts_renew” value=”1″ />
    <div class=”adverts-control-group adext-wc-payments-field-payment adverts-field-name-payments_listing_type “>
    <label for=”payments_listing_type”>
    <span class=”adverts-form-required”>*</span>
    </label>
    <div class=”adverts-pricings-list”></div>
    </div>
    <div style=”border-top:2px solid silver; padding: 1em 0 1em 0; display: none”>
    <input type=”submit” name=”submit” value=”Preview” style=”font-size:1.2em” class=”adverts-cancel-unload” />
    </div>
    </fieldset>
    </form></div>
    </div>

    Thanks…
    John

    Thread Starter John Powell

    (@digipark)

    Greg,

    Thanks for your reply…

    1 & 2 https://test.cdaonline.org/advertising-a-sponsorship/classified-ads/
    open the DENTISTS toggle and you’ll see “test test test” with my lovely mug as a boy

    The SOLD icon will show there on the group listing but not on the individual page here – https://test.cdaonline.org/advert/test-test-test-2/

    There also is none of the sold text shown (the text you can configure in the admin for above and below the sold ad).

    I’m not sure why the Contact Email isn’t showing.

    As for RENEW, it’s not a total white page of death issue. When you’re in the ad management console and click the renew ad, it goes to the renew page, for example https://test.cdaonline.org/my-account/my-classifieds/?advert_renew=37889 but there is no renewal options or content. You see the admin buttons and below you see a single red asterisk (like you’d see with a ‘required’ field) but no other content, just the rest of the page (the remainder of the page and footer display ok).

    Note there are broken images/etc on the test site. Because of size of the site it was duplicated and then a lot of WP content removed to make it fit within their hosting account.

    About the renewal notification, do you have any direction regarding this? I’ve done some custom email notification work with WPAdverts already in functions.php but I’m not sure where to start regarding expiration date check and I’ll have to figure out a method to track when email notifications were sent.

    Ultimately we have clients that want their ads to go indefinitely without end while they just make little adjustments as needed, but I don’t know of a way to do this other than your upcoming Subscriptions module.

    Thanks again Greg. If you send me an email through the contact form at digipark **dot** com I can make you an admin login on the development site to look at it.

    John M Powell
    Digipark

Viewing 15 replies - 1 through 15 (of 24 total)