Custom code snippets and examples for SkyVerge-built WooCommerce extensions

Overview

SkyVerge WooCommerce Plugins

Welcome to the wc-plugins-snippets repository! This repository stores code snippets related to SkyVerge WooCommerce plugins to modify or add onto plugin behavior.

Code snippets are organized by plugin (folder), and each plugin's folder includes one file per snippet or code example. The file name describes the snippet functionality.

Some larger plugins, such as Memberships, may have sub-folders by category / snippet type to make it easier to find relevant snippets.

Please ensure you know how to add custom code to your website if you use any of these code snippets. These are provided publicly as a courtesy, and are not supported, so you should be familiar with adding code to your site to use them.

Issues and Contributions

If you notice a snippet is outdated, we welcome pull requests for updates 😸

We also welcome new snippets! Please first check to see if a similar snippet exists, then submit a PR adding your snippet to the appropriate plugin folder(s), and ensure the name of the file is descriptive of what the snippet does. Including a brief description at the top snippet file is also helpful.

PR Guidelines

  • Please ensure that your PR follows WordPress coding standards and conventions.

  • All snippets should be PHP 5.3-compatible and use best WooCommerce practices. Try to maintain compatibility at least as far back as WooCommerce 2.6.x, or otherwise note requirements in the snippet.

  • Please use "poor man's namespacing" for function names by using this format:

function sv_wc_{plugin_name}_my_function() {
   // the function code
}
  • Files should include one "snippet" or example per file.

  • If your snippet relates to multiple plugins, put it in both folders so it's easy to find.

Licensing

All snippets / code in this repository is GPL licensed (GNU General Public License v3.0). If you plan to contribute your own snippets, please note that they will adopt this license.

You might also like...
⚡ Php snippets, random stuff, demos, functions, fast message system, agnostic and framework free - 100% compactible ;) ⚡
⚡ Php snippets, random stuff, demos, functions, fast message system, agnostic and framework free - 100% compactible ;) ⚡

⚡ Php8 FPM Nginx Fast, Scripts, Pearls & Treasures 🚀 Want to run and test asap ? docker-compose up -d phpgit_php8;ip=$(docker-machine ip default);ech

MagentoSnippets - Magento Front End Snippets, plugin for Sublime Text

MagentoSnippets Magento Front End Snippets, plugin for Sublime Text. This tool serves to aid the productivity during the Magento's theme development t

Glz custom fields - Unlimited Custom Fields for Textpattern

Unlimited custom fields for Textpattern This plugin sits under the Extensions tab in the back-end and gives your custom fields new life. You can final

Magento 2 custom extension to add custom attributes(longitude, latitude) to customer address

Magento 2 custom extension to add custom attributes(longitude, latitude) to customer address. Then save them to quote model and copy them from quote address to order address on bakend, frontend, rest api

A few Fat-Free specific extensions for Tracy Debugger to help debug your code quickly.

Fat-Free Tracy Extensions This is a set of extensions to make working with Fat-Free a little richer. F3 - Analyze all hive variables. Database - Analy

Showing what's new in PHP 8 with examples and tests

#PHP 8 what's new with examples Showing what's new in PHP 8 with examples and tests. I believe that reading about the changes is not enough, so grab t

Wordpress Plugin Boilerplate but Powered with examples and a generator!
Wordpress Plugin Boilerplate but Powered with examples and a generator!

WordPress Plugin Boilerplate Powered WordPress Plugin Boilerplate Powered is a complete foundation for building your WordPress plugins following PSR-4

Some Joomla! 4.x Web Services Api Examples and Experiments to raise the level of awareness of the huge potiental of Joomla! 4.x Web Services.

j4x-api-examples WHY? If you are a Joomla! developer or want to become a Joomla! developer there is a new resource for you The Official New Joomla! Ma

Sitepackage for TYPO3 CMS that adheres to the recommended standards, maps all conceivable functional areas and contains examples for common use cases.

TYPO3 CMS Sitepackage This sitepackage sticks as closely as possible to the recommended standard and maps all conceivable functional areas. There are

Comments
  • CSV/XML export unification and migration

    CSV/XML export unification and migration

    • Remove legacy plugin directories
    • Create new unified plugin directory
    • Copy over legacy scripts to legacy directory with the unified plugin
    • migrate CSV and XML snippets to use the latest filters and actions
    opened by simonporter007 4
  • Remove the Shipping Address for virtual products

    Remove the Shipping Address for virtual products

    I´m trying to remove the Shipping Address for virtual products with a snippet, but I´m totally not a pro in this. Can anyone support please how to code this? As a starting point I tried to use the "remove payment method" snippet which of course didn´t work:

    /**

    • Removes "Shipping Address" from the header table of invoices
    • @param array $column array containing the column of the footer table
    • @param string $type the type of document being viewed
    • @param \WC_Order $order the order object the document is for
    • @return array $column the updated array */

    function sv_wc_pip_document_table_footer( $column, $type, $order_id ) {

    //bail if document type is not invoice
    if ( 'invoice' !== $type ) { return $column; }
    
    //remove payment method from array
    if ( isset( $column['shipping-address'] ) ) {
    	unset( $column['shipping-address'] );
    }
    
    return $column; //return updated array
    

    } add_filter( 'wc_pip_document_table_footer', 'sv_wc_pip_document_table_footer', 10, 3 );

    opened by nicomputer 0
  • Fixing deprecated function warning

    Fixing deprecated function warning

    Code at Line 11 is generating following error:

    The WC_Memberships_Frontend::get_members_area_instance function is deprecated since version 1.19.0. Replace with WC_Memberships_Frontend::get_my_account_instance()->get_members_area_instance().

    It can be fixed by replacing with the following code:

    		$members_area = $frontend ? $frontend->get_my_account_instance()->get_members_area_instance() : null;
    
    opened by logichub 0
Owner
SkyVerge
SkyVerge
WooCommerce Empty Cart Button plugin helps you to add Empty Cart button to WooCommerce Pages/Sections using Shortcode only.

WooCommerce Empty Cart Button plugin helps you to add Empty Cart button to WooCommerce Pages/Sections using Shortcode only. How to use? Download the p

Katr 2 Sep 24, 2022
Silverstripe-searchable - Adds to the default Silverstripe search by adding a custom results controller and allowing properly adding custom data objects and custom fields for searching

SilverStripe Searchable Module UPDATE - Full Text Search This module now uses Full Text Support for MySQL/MariaDB databases in version 3.* Adds more c

ilateral 13 Apr 14, 2022
Easily create and work with code snippets from PHP

code-snippets Easily create and work with code snippets from source code files of any type in PHP. The original code this package is based on was borr

Permafrost Software 8 Sep 4, 2022
A library of powerful code snippets to help you get the job done with Gravity Forms and Gravity Perks.

Gravity Wiz Snippet Library Gravity Wiz is creating the most comprehensive library of snippets for Gravity Forms ever. We'll be consistently moving ou

Gravity Wiz 151 Dec 27, 2022
A self-hosted alternative to putting your code snippets on Gist.

WP-Gistpen Contributors: JamesDiGioia Donate link: http://jamesdigioia.com/ Tags: gist, code snippets, codepen Requires at least: 5.2 Requires PHP: 5.

Intraxia 71 Nov 15, 2022
SERP Scraping API code examples for Python, PHP and Node.js

SERP Scraping API List of contents Introduction Authentication Google Baidu Bing Yandex Parameters Targets Languages License Introduction With our SER

Smartproxy 8 Nov 7, 2022
PhpCodeAnalyzer scans codebase and analyzes which non-built-in php extensions used

PhpCodeAnalyzer PhpCodeAnalyzer finds usage of different non-built-in extensions in your php code. This tool helps you understand how transportable yo

Sergey 92 Oct 19, 2022
PhpCodeAnalyzer scans codebase and analyzes which non-built-in php extensions used

PhpCodeAnalyzer PhpCodeAnalyzer finds usage of different non-built-in extensions in your php code. This tool helps you understand how transportable yo

Sergey 89 Jan 14, 2022
Collection of useful PHP functions, mini-classes, and snippets for every day.

JBZoo / Utils Collection of PHP functions, mini classes and snippets for everyday developer's routine life. Install composer require jbzoo/utils Usage

JBZoo Toolbox 786 Dec 30, 2022
Collection of PHP functions, mini classes and snippets for everyday developer's routine life

JBZoo / Utils Collection of PHP functions, mini classes and snippets for everyday developer's routine life. Install composer require jbzoo/utils Usage

JBZoo Toolbox 776 Jun 2, 2022