Karen Callahan Honored by the Local Chamber of Commerce

April 22nd, 2017 Karen Callahan

Last week, I stopped in to the local Chamber of Commerce to say hello and inquire about a recent vacation taken by the President and CEO, Susanne Morreale-Leeber.  I wasn’t there two minutes when Susanne surprised me with this beautiful plaque.

Honor from Chamber of Commerce

( Click for larger view )

I had served on the Board of Directors for the Marlborough Regional Chamber of Commerce for seven years, resigning in December 2016. For me, the best times were when we met in smaller groups to map out a strategy, welcome newcomers, brainstorm about ways to improve the ‘member experience’, compile checklists and plans of action for accomplishing one or another of the Chamber’s goals.  Here I am standing proudly with the other 2016 Directors.

2016 Marlborough Chamber Directo

2016 Board of Directors for the Marlborough Regional Chamber of Commerce 

Networking with Metrowest Polka Dot Powerhouse

April 13th, 2017 Karen Callahan
Karen Callahan at Polka Dots Powerhouse meeting

Can you find me? (…third from the right in the front row)

The Metrowest chapter of the national organization Polka Dot Powerhouse® (PDP) recently launched in Framingham. Having attended and been very impressed with a PDP meeting on the North Shore last year, I joined this local group as soon as I heard it was starting up. Here I am with my Dot sisters at our April monthly lunchtime meeting at John Harvard’s.  Great networking. Great fun. Great personalities.

Most Attacked WordPress Plugins in January 2017

February 8th, 2017 Karen Callahan

Wordfence security report

In Wordfence’s monthly report about attacks on WordPress websites, they list the top 25 plugins that received the most focus in January 2017. In order of the number of MOST attacks received, they are:

  1. wp-ecommerce-shop-styling
  2. wp-symposium
  3. candidate-application-form
  4. google-mp3-audio-player
  5. recent-backups
  6. wptf-image-gallery
  7. db-backup
  8. really-simple-guest-post
  9. dzs-zoomsounds
  10. wp-mobile-detector
  11. jquery-html5-file-upload
  12. woocommerce-product-options
  13. s3bubble-amazon-s3-html-5-
    video-with-adverts
  14. plugin-newsletter
  15. tinymce-thumbnail-gallery
  16. simple-download-button-
    shortcode
  17. pica-photo-gallery
  18. wp-filemanager
  19. dukapress
  20. eugeot-music-plugin
  21. acf-frontend-display
  22. levelfourstorefront
  23. formcraft
  24. malapascua-agency
  25. work-the-flow-file-upload

The report goes on to say:

The WP-Mobile-Detector plugin saw the biggest gain in the number of attacks, jumping 25 points in our rankings to position 12. The plugin has been removed from the WordPress plugin repository, probably because a vulnerability was not fixed by the author, and the last review was posted over 7 months ago.

Read the full report here.

New WordPress Packages Introduced

February 6th, 2017 Karen Callahan

Thursday, 2-2-2017, I presented at my BNI in Marlborough, MA. As the other BNI members are my sales force, I introduced several new packages that I have begun rolling out this year.

Karen Callahan presenting 2-2-2017

Introducing new WordPress packages at my BNI 2-2-2017

These multi-month to year-long packages include irresistible offers and bonuses including input from and conversations with experts in related fields. The packages are themed around:

  1. How to add SEO to your WordPress Website
  2. Easily keeping your WordPress website up to date
  3. Keeping WordPress and the plugins updated
  4. Website Design (Redesign) and Development package

I am on a quest to help WordPress website owners work as independently as they wish – and – you see that the first two packages are designed to set WordPress do-it-yourself’ers up for long-term success.

I’ll be posting the details about the WordPress packages including sign up forms later this month and next.  Be on the lookout!

Automatically Create WooCommerce Product for PDF Download

January 9th, 2017 Karen Callahan

A challenging WordPress project that I recently worked on required that a WooCommerce no-cost virtual, downloadable product be created each time a PDF was uploaded into a certain section on the screen of certain custom post types.

  • A history of the downloads of a PDF product was to be kept for years.
  • Only PDFs uploaded in the PDF Product Group section (a section created as part of the solution for this business requirement) were to be converted into WooCommerce PDF products. (PDFs could be uploaded and linked to inside the regular WordPress post content area. Those PDFs were to be handled by WordPress as it normally does, and were NOT to be added as WooCommerce products.)
    Custom Field Group for PDF Product

    Custom field group for PDF product shown on this client’s custom post type for Case Studies

  • The client had multiple custom post types. Some allowed PDF product uploads and others did not.
  • On the custom post types that allowed PDF product uploads, a PDF was not required to be uploaded.
  • Only one PDF product could be associated with a post at any given time.
  • The reason the PDFs were added to WooCommerce as products was so that the client could track which people downloaded which PDF products. (I was not asked for a recommendation on how I would implement this; I was asked to make it happen using WooCommerce as the manager.)

What I did was:

  1. Make a list of the minimum fields that WooCommerce creates when a virtual, downloadable product is created
  2. Confirm how WooCommerce handles no-cost products
  3. Create a custom field group, the PDF Product Group, that contains the Title of the PDF to be used for the Product title, an upload file field (for uploading the PDF), a small description field to be used as the PDF product’s description.
  4. Added an ‘action’ function in functions.php that runs on ‘save_post’. The function checks whether the post is one of the custom post types that can have a PDF. Then it checks whether a PDF has been successfully uploaded, followed by verifying that a title and a description have been added.
  5. Once all of those validations have been passed, a WooCommerce virtual, downloadable product is created using those fields and others (defined in the first step above) that are set to default values (like the product category which changes according to the custom post type). In all, 29 postmeta records are added.
  6. Finally, the one-to-one relationship between this post and the PDF product that was just created is recorded by adding another postmeta record. This effectively defines the post as the ‘parent’ of the product.

Adding the product for the first time (processing above) was the easy part. Deleting the product was the second easiest.

Remember that the PDF product is related to the ‘original‘ post. That original post has a unique identifier, the post ID. When a WordPress post is edited, a new post is created with its own unique ID (the revision) and the original post’s ID is added to the ‘post_parent’ field in the revision’s record, so, I had to be careful about which post ID I was referencing in the PHP programming: the revision’s post ID, the parent’s post ID, the PDF product’s post ID, or one of the postmeta record’s post ID.

Automatically deleting the WooCommerce PDF product

Since this client was tracking who downloaded which PDFs, the PDF products were not deleted. Instead, they were marked as inactive so that the PDF free products would not display as active downloads on any of the pages – and – the download history was preserved for reporting purposes.

The delete process works like this:

  • Check to see if one of those postmeta ‘parent-child’ records exists for the ‘parent’ post. (By business requirement, there can be only one…if there is any.)
  • Check whether there is a value in the PDF product custom file upload field of the current post.
  • If there is no product in the PDF product custom field of the revision post, use the WooCommerce product post ID in the parent-child record of the revision’s parent to retrieve the product information and mark it as inactive.
  • If there is a product in the PDF Product custom field of the current post, then maybe the records needed to be updated. (see next section)

Updating the WooCommerce PDF product

The toughest part was trying to decipher whether the PDF had been modified and re-uploaded, and, if so, was it uploaded with the same name or a different one? When updating WooCommerce downloadable products directly, WooCommerce keeps track and knows which version to serve for download. WooCommerce can even send a notice to users who downloaded the previous version that there is a new version available. Updating a WooCommerce downloadable product from outside WooCommerce upped the level of complexity.

One thought was to check the most recent PDF name against the name of the PDF originally uploaded. While this final piece was being coded and unit tested, the program manager decided to change course.  The WooCommerce-as-the-manager approach was abandoned. Before that happened, all the other code was unit and system tested, and working – as was the ability to track who downloaded what.

Limited Checkout Fields for Free PDF Downloads

Since the client wanted to know who downloaded which PDF, it was necessary for the person downloading to be logged in.

  • If the person downloading did not already have an account at the website, an account needed to be created.
  • If they were downloading only the FREE PDFs, it was not necessary to fill in the multiple checkout screens that WooCommerce normally presents. The WooCommerce Checkout for Digital Goods plugin was used to capture minimal contact information and create a WooCommerce account for them.
  • If there were pay-for products also in the cart, the purchaser would experience the normal, multi-screen WooCommerce checkout process (if they did not already have an account).

So, what seemed like a simple requirement “use WooCommerce to track who downloads the FREE PDFs” became quite challenging when adding and maintaining WooCommerce records outside of the WooCommerce Products module.