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 The Page ID You Need | |
get_option( 'woocommerce_shop_page_id' ); | |
get_option( 'woocommerce_cart_page_id' ); | |
get_option( 'woocommerce_checkout_page_id' ); | |
get_option( 'woocommerce_pay_page_id' ); | |
get_option( 'woocommerce_thanks_page_id' ); | |
get_option( 'woocommerce_myaccount_page_id' ); | |
get_option( 'woocommerce_edit_address_page_id' ); | |
get_option( 'woocommerce_view_order_page_id' ); | |
get_option( 'woocommerce_terms_page_id' ); |
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 | |
echo '<pre>'; | |
echo '<span style="color:blue">DOWNLOADING...</span>'.PHP_EOL; | |
// Download file | |
file_put_contents('wp.zip', file_get_contents('https://wordpress.org/latest.zip')); | |
$zip = new ZipArchive(); | |
$res = $zip->open('wp.zip'); | |
if ($res === 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
/** | |
* Convert myCRED Points into WooCommerce Coupon | |
* Requires myCRED 1.4 or higher! | |
* @version 1.3.1 | |
*/ | |
add_shortcode( 'mycred_to_woo_coupon', 'mycred_pro_render_points_to_coupon' ); | |
function mycred_pro_render_points_to_coupon( $atts, $content = NULL ) { | |
// Users must be logged in | |
if ( ! is_user_logged_in() ) |
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
// For Yoast SEO Plugin Version: 14.1+ add to your Wordpress Theme's functions.php... | |
// Remove All Yoast HTML Comments | |
// https://gist.github.com/paulcollett/4c81c4f6eb85334ba076 | |
// Credit @devendrabhandari (https://gist.github.com/paulcollett/4c81c4f6eb85334ba076#gistcomment-3303423) | |
add_filter( 'wpseo_debug_markers', '__return_false' ); | |
// For Yoast SEO Plugin Version: < 14.1 add to your Wordpress Theme's functions.php... |
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
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/file/to/exclude\.php | |
RewriteCond %{REQUEST_URI} !^/wp-content/plugins/directory/to/exclude/ | |
RewriteRule wp-content/plugins/(.*\.php)$ - [R=404,L] | |
RewriteCond %{REQUEST_URI} !^/wp-content/themes/file/to/exclude\.php | |
RewriteCond %{REQUEST_URI} !^/wp-content/themes/directory/to/exclude/ | |
RewriteRule wp-content/themes/(.*\.php)$ - [R=404,L] |
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 | |
/** | |
* Allow HTML Tags in Wordpress Excerpt | |
* | |
* @link http://wordpress.stackexchange.com/questions/141125/allow-html-in-excerpt/141136 | |
*/ | |
if ( ! function_exists( 'wpse_custom_wp_trim_excerpt' ) ) : | |
function wpse_custom_wp_trim_excerpt( $wpse_excerpt ) { |
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
add_filter( 'woocommerce_product_single_add_to_cart_text', 'wc_ninja_change_backorder_button', 10, 2 ); | |
function wc_ninja_change_backorder_button( $text, $product ){ | |
if ( $product->is_on_backorder( 1 ) ) { | |
$text = __( 'Pre-Order', 'woocommerce' ); | |
} | |
return $text; | |
} |
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
######################################################################## | |
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024 | |
# ---------------------------------------------------------------------- | |
# @Author: Andreas Hecht | |
# @Author URI: https://seoagentur-hamburg.com | |
# License: GNU General Public License v2 or later | |
# License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
######################################################################## | |
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 | |
/** | |
* Plugin Name: Filter WooCommerce Orders by Payment Method | |
* Plugin URI: http://skyverge.com/ | |
* Description: Filters WooCommerce orders by the payment method used :) | |
* Author: SkyVerge | |
* Author URI: http://www.skyverge.com/ | |
* Version: 1.0.0 | |
* Text Domain: wc-filter-orders-by-payment | |
* |
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
<script> | |
jQuery( document ).on( 'nfFormReady', function() { | |
nfRadio.channel('forms').on('submit:response', function(form) { | |
window.dataLayer = window.dataLayer||[]; | |
dataLayer.push({ | |
event: 'ninjaFormSubmission', | |
eventData: form.data, | |
formID: form.data.form_id, | |
formTitle: form.data.settings.title | |
}) |
OlderNewer