Cron Jobs and WordPress

function some_plugin_activation() { if (!wp_next_scheduled( ‘some_plugin_check_cron_event' )) { some_plugin_schedule_event(); } else { some_plugin_deactivation(); some_plugin_schedule_event(); } } function some_plugin_deactivation() { if ( wp_next_scheduled (...

Current Year Shortcode

Sometimes you will want to output the current year within your site.  It is very useful with not having to update the Copyright notice in the footer of your site. Place the following code within your functions.php in the child theme and you are good to use the...

Custom Gravity Forms Popup Error Message

Here is a sample of code on how to show a custom popup error message. add_filter( ‘gform_validation_message_3', ‘sw_gf_validation_message', 10, 2 ); function sw_gf_validation_message( $validation_message ) { add_filter( ‘wp_footer',...

Customize the Added to Cart Message

So I ran into a request where the client was looking to have a Continue Shopping button after a product got added to the cart.  So in this example I used the wc_add_to_cart_message hook to add a continue shopping button below what normally got output.  You will also...

Customize the Thank You Text on WooCommerce order

If you happen to want to change the text that is shown at the top of the order received or order confirmation page after someone successfully checks out in WooCommerce you can do so by adding a filter to the woocommerce_thankyou_order_received_text hook.  You can put...