WooCommerce reviews + tutorials

How to Create a WooCommerce Widget

…splay arguments (such as before_title, after_title, etc), which are typically used by themes to format widgets, so you should include these. The basic structure of this function should look something like this to include the display arguments properly: public function widget( $args, $instance ) { // get the widget’s configured title $title = $instance[‘title’]; echo $args[‘before_widget’]; if ( $title ) { echo $args[‘before_title’] . $title . $arg…

Read More

WooCommerce reviews + tutorials

How to Create a Simple WooCommerce Payment Gateway

…since the payment hasn’t been received. Reduce Stock (optional). You probably want to reduce inventory once the order is processed to reserve the stock. However, you can leave this out if the order won’t reduce stock until the admin manually reduces it (not recommended), or if you’ll be adding your own code to reduce it when the status is changed from on-hold to processing. Remove the cart with WC()->cart->empty_cart();. Now that the order is plac…

Read More

Ask SkyVerge

Changing the Storefront My Account Page

…pretty simply! We’ll just need a bit of CSS to change this layout. We’ll only apply it if the screen is larger than 768px, as screens smaller than this should use a one-column layout to ensure the forms are large enough to use. You can add this to your child theme’s stylesheet or your custom CSS plugin. @media screen and (min-width: 768px) { #customer_login.col2-set { width: 100%; } #customer_login .col-1 { width: 47%; border-bottom: none !importa…

Read More

Next Evolution of the WooCommerce iOS App

…with Jay at WooCommerce to do an entirely new sort of development was really exciting for our team. It gave us the opportunity to be heavily involved in the WooCommerce REST API development while learning more about mobile apps and the iOS platform. We were the right sort of team in the right position to get the app built and launch an MVP as leaders of the initial REST API implementation (which the app relies on to communicate with your store),…

Read More

Pagely staging site

How to create a Pagely staging site (for the non-developer)

…one of two hosts we recommend, and we migrated all of our own sites to Pagely early this year. One feature that many eCommerce sites need as part of their managed hosting services are staging sites, as these help you test updates and debug issues so you don’t have to deactivate plugins or try out new updates on your live site while you’re accepting orders. While Pagely is an excellent option for WooCommerce hosting, staging sites are only availabl…

Read More

For Translators: Environments

…y come across words like “test” and “production” for environments (especially related to payment gateways), which can be a bit difficult to understand. Here’s an overview of what these mean. Environment Environment is a software term that refers to the conditions in which a plugin or integration acts. If a WordPress site runs PHP version 5.3 and WordPress 4.2, these are part of the site environment, just as trees or desert would be part of a physi…

Read More

WordPress development tutorials

How to Generate a Post Excerpt Outside the Loop

…🙁 You’ll need to generate your own excerpt if none exists. We could manually generate excerpts by pushing all of the content into a string and cutting off the first x words to generate the excerpt, but this isn’t really necessary (and is pretty messy). We can simulate what get_the_excerpt() does to generate an excerpt if one is not set by passing the full content into wp_trim_words() (WordPress 3.3+). This will generate an excerpt for us from the…

Read More

WooCommerce reviews + tutorials

Add Plugin Settings to WooCommerce, Part 1

…s a list of subscriptions or memberships, or email campaigns. It’s not really a good place for settings since typically users configure settings once, then leave them be. Don’t add things this way unless you’re confident users will visit this page multiple times per week. So now onto where we should add our settings. Many times, settings should be added to an existing WooCommerce section. For example, if your setting relates to product display, th…

Read More

Team

Add Plugin Settings to WooCommerce, Part 2

…ys based on the section being viewed, and now we’re cooking with gas: Finally, we’ll need to save our settings based on which section is being saved so that we can properly retrieve them for use elsewhere in our plugin. WooCommerce has a helper for this as well: WC_Admin_Settings::save_fields( $settings ); This will save settings correctly as options using the IDs you’ve set. /** * Save settings * * @since 1.0 */ public function save() { global $c…

Read More

month in review

November in Review

…ates to automate tax calculations. This integration plugin will be completely free, and only requires an Avalara account (paid), so we definitely recommend looking into Avalara if you’d like to simplify and automate your tax recording. Coming in December We’re about to release version 1.4 of WooCommerce Memberships (you should see the update available today), which Fulvio and Max have been working on — keep an eye out! We’ll have a post detailing…

Read More