This file contains hidden or 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
$lang = get_bloginfo("language"); | |
if ( $lang == 'de-DE' ) { | |
add_action('init', 'search_base_german'); | |
function search_base_german() { | |
$search_slug = 'suche'; // change slug name | |
$GLOBALS['wp_rewrite']->search_base = $search_slug; | |
} | |
} |
This file contains hidden or 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
const helpers = require('./helpers'); | |
const webpackMerge = require('webpack-merge'); // used to merge webpack configs | |
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev | |
/** | |
* Webpack Plugins | |
*/ | |
const DefinePlugin = require('webpack/lib/DefinePlugin'); | |
const NamedModulesPlugin = require('webpack/lib/NamedModulesPlugin'); | |
const LoaderOptionsPlugin = require('webpack/lib/LoaderOptionsPlugin'); |
This file contains hidden or 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
const helpers = require('./helpers'); | |
const webpackMerge = require('webpack-merge'); // used to merge webpack configs | |
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev | |
/** | |
* Webpack Plugins | |
*/ | |
const DedupePlugin = require('webpack/lib/optimize/DedupePlugin'); | |
const DefinePlugin = require('webpack/lib/DefinePlugin'); | |
const IgnorePlugin = require('webpack/lib/IgnorePlugin'); |
This file contains hidden or 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
add_action('plugins_loaded', 'stp_pop_init'); | |
if (!function_exists('stp_pop_init')){ | |
function stp_pop_init() { | |
add_action('init', 'stp_pop_setup', 9999); | |
wp_register_style( | |
'stp_bootstrap_theme_css', | |
plugins_url( '/assets/css/bootstrap-theme.css', __FILE__ ), | |
false, |
This file contains hidden or 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
// The button to add the regular product | |
<a class="btn btn-addcart add_to_cart" data-count="1" data-pid="284">Add to cart</a> | |
// dropbox created dynamically from backend | |
<div class="add-on-service talktime-options hidden-box" id="talktime-options-284" style="display: block;"> | |
<select class="form-control" id="select-extra-time-284"> | |
<option>Please select an option</option> | |
<option data-attributename="pa_additional-talktime" data-slug="30mins" value="7804">30mins (+$3.00)</option> | |
<option data-attributename="pa_additional-talktime" data-slug="60mins" value="7805">60mins (+$6.00)</option> | |
</select> |
This file contains hidden or 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
getTransportations() { | |
let loader = this.loadingController.create({ | |
content: 'Getting data...' | |
}); | |
loader.present(); | |
return this.wpApi.getTransportations(this.maxResults) | |
.then( (data) => { | |
if ( data.status == 200 ) { | |
this.transportantions = data.response.entries; | |
} else { |
This file contains hidden or 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
const helpers = require('./helpers'); | |
const webpackMerge = require('webpack-merge'); // used to merge webpack configs | |
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev | |
/** | |
* Webpack Plugins | |
*/ | |
//const DedupePlugin = require('webpack/lib/optimize/DedupePlugin'); | |
const DefinePlugin = require('webpack/lib/DefinePlugin'); | |
const IgnorePlugin = require('webpack/lib/IgnorePlugin'); |
This file contains hidden or 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
//The array has this format | |
//[ | |
// { | |
// "name" : "T-Shirt", | |
// "available_attributes": [ | |
// "size", "color" | |
// ], | |
// "variations": | |
// [ |
This file contains hidden or 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 | |
require dirname(__FILE__).'/wp-blog-header.php'; | |
$wpdb->query("DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%')"); | |
$wpdb->query("DELETE FROM wp_term_taxonomy WHERE taxonomy LIKE 'pa_%'"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy)"); | |
$wpdb->query("DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type IN ('product','product_variation'))"); | |
$wpdb->query("DELETE FROM wp_posts WHERE post_type IN ('product','product_variation')"); |
This file contains hidden or 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 free_shipping_cart_notice() { | |
$min_amount = 100; | |
// Subtotal inc. Tax excl. Shipping | |
$current = WC()->cart->subtotal; | |
if ( $current < $min_amount ) { | |
$added_text = esc_html__('You will have FREE shipping if you add ', 'woocommerce' ) . wc_price( $min_amount - $current ) . esc_html__(' more in your order!', 'woocommerce' ); | |
$return_to = apply_filters( 'woocommerce_continue_shopping_redirect', wc_get_raw_referer() ? wp_validate_redirect( wc_get_raw_referer(), false ) : wc_get_page_permalink( 'shop' ) ); |
OlderNewer