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
## WordPress | |
https://github.com/johnbillion/wp_mail | |
## BuddyPress Emails | |
A member has replied to an activity update that the recipient posted. | |
A member has replied to a comment on an activity update that the recipient posted. | |
Recipient was mentioned in an activity update. | |
Recipient was mentioned in a group activity update. | |
Recipient has registered for an account. |
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
/** | |
* Load Elasticseach PHP 7 Client via composer | |
* Updated for ElasticPress 3.3 | |
*/ | |
require 'vendor/autoload.php'; | |
/** | |
* Init Elasticsearch PHP Client | |
*/ | |
use Elasticsearch\ClientBuilder; |
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 | |
function pewc_get_multicurrency_price( $price, $item, $product ) { | |
// Compatibility with WooCommerce multilingual | |
$price = apply_filters( 'wcml_raw_price_amount', $price ); | |
if( class_exists('WOOCS') ) { | |
global $WOOCS; | |
if ($WOOCS->is_multiple_allowed) { | |
$price = $WOOCS->woocs_exchange_value( floatval( $price ) ); |
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 | |
/** | |
* Use this filter to set a different default quantity for child products | |
*/ | |
function prefix_filter_default_child_independent_quantity( $quantity_field_value, $child_product_id, $item ) { | |
return 1; | |
} | |
add_filter( 'pewc_child_product_independent_quantity', 'prefix_filter_default_child_independent_quantity', 10, 3 ); |
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 | |
function prefix_reset_table_quantity( $args, $product ) { | |
$args['input_value'] = 1; | |
return $args; | |
} | |
add_filter( 'woocommerce_quantity_input_args', 'prefix_reset_table_quantity', 10, 2 ); |
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 | |
/** | |
* Filter the price html on shop and product pages | |
* @todo Display correct variation price range in variation.php | |
*/ | |
function prefix_get_price_html( $price, $product ) { | |
$rules = get_option( 'wcfad_dynamic_pricing_rules', false ); | |
// Get the best user role defined price |
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 | |
/** | |
* A products field template | |
* Ensure that the 'Products Quantities' field is set to 'One Only' | |
* @since 2.2.0 | |
* @package WooCommerce Product Add Ons Ultimate | |
*/ | |
// Exit if accessed directly | |
if( ! defined( 'ABSPATH' ) ) { |
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 | |
/** | |
* Return a blank instead of the product for products that contain child products | |
*/ | |
function my_prefix_cart_item_price( $price, $cart_item, $cart_item_key ) { | |
$product_id = $cart_item['data']->get_id(); | |
// Add the product IDs here that contain child products | |
if( in_array( $product_id, array( 5121, 2222 ) ) ) { | |
// You can enter different text below if you wish | |
return '-'; |
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 | |
/** | |
* Create multiple variables for calculation fields | |
*/ | |
function prefix_calculation_global_calculation_vars( $vars ) { | |
return array( | |
'my_first_variable' => 50, | |
'price_modifier_1' => 150 | |
); | |
} |
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
/** | |
* Get Member IDs | |
*/ | |
$member_ids = array(); | |
$view = new MM_MembersView(); | |
$dataGrid = new MM_DataGrid(null, null, "desc", 99999); | |
$data = $view->search(null, $dataGrid); | |
foreach ( $data as $member ) { | |
$member_ids[] = $member->id; |
OlderNewer