Category: Web Development

  • WooCommerce Subscription Rest API Plugin

    WooCommerce Subscription Rest API Plugin

    Fulfillment companies looking to utilize WooCommerce Subscription sometimes need additional meta data about the # of orders from a subscription.

    Or perhaps the subscription ID of the order?  I’ve included this information in a WooCommerce plugin.  This is especially useful for fulfillment companies.

  • HTML Redirect

    HTML Redirect

    Use the following to automatically forward someone using just HTML 🙂

    
    
    <meta http-equiv="refresh" content="5; url=http://example.com/">

    Place this in the <head> tag.

  • React HashRouter

    React HashRouter

    Example code snippet on HashRouter from react-router-dom.  This routing alternative can be used on hosting services such as GitHub pages and other static hosting services.

    Implementation

    Import HashRouter:

    
    
    import { HashRouter as Router, Route } from 'react-router-dom';

    Example code that goes in render():

    
    
    &lt;HashRouter>
       &lt;div>
          &lt;Route path="/" component={Home} />
          &lt;Route path="about" component={About} />
          &lt;Route path="teachers" component={Teachers} />
          &lt;Route path="courses" component={Courses} />
       &lt;/div>
    &lt;/HashRouter>

    Here’s a link to my Gist if that doesn’t come out correctly.

    Drawbacks

    A collection of thoughts and issues I’ve found for using HashTag for a website:

    • There could be SEO issues related to using the HashTag URLS.
    • Clean URLs are better for SEO.  However, that’s also still questionable since this is a Single Page Application (SPA) unless generated from a NodeJS backend that can help generate the appropriate content.
  • IAHSP Europe

    IAHSP Europe

    We have a new website that I helped put together with my team.  We used WordPress, Angular 5, Google Cloud Functions, and AWS.

    I’m very proud of the work everyone did to help build such an awesome website.  I’m especially proud to be part of a global association for all Home Stagers across the world.

  • WordPress Private Pages

    WordPress Private Pages

    Use the following code snippet to make a theme page that is private.  It will require the user to log on their administrative WP page as a user to view the contents on this page.

  • BeWorkPlace.com

    BeWorkPlace.com

    Completed an AWS deployment project for a WordPress website using AWS Lightsail, RDS, S3, CloudFront, CloudWatch 😀

    Visit their website at BeWorkPlace.com

  • Disabling WooCommerce Reviews

    Disabling WooCommerce Reviews

    One of the websites that I worked on requested to remove the WooCommerce Reviews.  You could use the mini-plugin that I’ve developed to help you take care of that:

    WooCommerce Remove Reviews

    To install the WooCommerce plugin, do the following:

    • Go to the plugin URL: WooCommerce Remove Reviews
    • Click the green button that says: Clone or Download
    • Then click: Download ZIP
    • Use this ZIP file to upload to your WordPress plugins.
  • Adding WP Action & Filter Hooks

    Adding WP Action & Filter Hooks

    There are two types of WP hooks that can be used to extend the abilities of WP functions.

    Filter Hooks

    The following will output “Hooked: Home” to the “the_title” WordPress function on every call to the function.

    add_filter("the_title", "dl_title");
    function dl_title($title) {
      return "Hooked: " . $title;
    }

    Important: This will always return something.

    Action Hooks

    After the exection of the wp_footer, the following verbiage will output AFTER: Shoutout to all the WordPress devs!

    add_action("wp_footer", "dl_footer_shoutout");
    function dl_footer_shoutout() {
      echo "Shoutout to all the WordPress devs!";
    }

    Prioritization

    Specific functions can be called at different times using prioritization.

  • Insert WorkCast to WordPress

    Insert WorkCast to WordPress

    One of my clients tasked me to implement WorkCast as one of their WordPress pages.  The issue I ran into with their Product Owner was that:

    • Not all WordPress pages should have the CSS/JS code.  This will conflict with WordPress' jQuery.
    • "Copy/Pasting" WorkCast into a WordPress editor page didn't work.  The page came up blank.  I'm suspecting this is because of JS conflicts with the WP theme.

    Solution

    I wrote a plugin that injects a "Theme Template" into any of WordPress Pages.  The user simply chooses "WorkCast" as the page template to utilize WorkCast.

    This solution is currently configured to work for Swords-To-Plowshares.org.  If you're interested on how it was done, head on over here.

  • Angular prod build using “ng build /serve –prod”

    Angular prod build using “ng build /serve –prod”

    While working on my Electron application my login functionality didn’t function anymore.

    Root Cause

    Updated Angular CLI and uglify also got updated.  The newest uglify version breaks builds.

    Solution

    Run the following to temporarily go back to a working version:

    npm i [email protected] --save-exact && rm -rf package-lock.json node_modules && npm i && npm ls uglify-es