This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Convert existing meta keys to new meta keys. | |
* | |
* @since x.x.x | |
* | |
* @global object $wpdb The current database. | |
* | |
* @param string $existing_key The existing meta key. | |
* @param string $new_key The new meta key. | |
* @param bool $remove_existing Optional. Whether to remove the old meta entries after conversion. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( function() { | |
var loadModal = function( modal ) { | |
$.post( | |
pinwheel_modals.ajax_url, | |
{ | |
action: 'load_modal', | |
modal: modal | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<ruleset name="SkyVerge PHP Coding Standards"> | |
<!-- See https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml --> | |
<!-- See https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/blob/develop/WordPress-Core/ruleset.xml --> | |
<!-- Set a description for this ruleset. --> | |
<description>A custom set of code standard rules to check for WordPress themes and plugins.</description> | |
<!-- Include the WordPress ruleset, with exclusions. --> | |
<rule ref="WordPress"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Sets a unique Merchant ID depending on the order currency for Bambora transaction requests. | |
* | |
* @param array $request_data transaction request data | |
* @param \WC_Order $order order object | |
* @return array | |
*/ | |
function sv_wc_bambora_set_currency_merchant_id( $request_data, $order ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // remove this if you don't need it | |
function riz_new_subcategory_hierarchy( $path ) { | |
$category = get_queried_object(); | |
$parent_id = $category->category_parent; | |
if ( 123456 != $parent_id ) { // Your category ID | |
return $path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // remove if not needed | |
add_filter( 'wc_first_data_payeezy_credit_card_perform_pre_auth', '__return_true' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class WooCommerce { | |
public $settings; | |
public function init() { | |
// all that other fun init stuff | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // only copy this line if needed | |
add_action( 'wp_enqueue_scripts', function() { | |
if ( ! is_user_logged_in() ) { | |
wp_dequeue_script( 'edd-jilt' ); | |
} | |
}, 15 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php // only include this if needed | |
/** | |
* Sends an SMS to the customer whenever a new customer note is added to an order. | |
* | |
* Customer notes usually trigger an email if enabled. | |
*/ | |
add_action( 'woocommerce_new_customer_note', function( $args ) { | |
if ( ! class_exists( 'WC_Twilio_SMS_Notification' ) || empty( $args['order_id'] ) || empty( $args['customer_note'] ) ) { |
OlderNewer