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 // Do not include this if already open! Code goes in theme functions.php. | |
add_action( 'after_setup_theme', 'add_wc_gallery_lightbox', 100 ); | |
function add_wc_gallery_lightbox() { | |
add_theme_support( 'wc-product-gallery-zoom' ); | |
add_theme_support( 'wc-product-gallery-lightbox' ); | |
add_theme_support( 'wc-product-gallery-slider' ); | |
} |
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 | |
// Found https://core.trac.wordpress.org/ticket/45719 | |
function fix_request_query_args_for_woocommerce( $query_args ) { | |
if ( isset( $query_args['post_status'] ) && empty( $query_args['post_status'] ) ) { | |
unset( $query_args['post_status'] ); | |
} | |
return $query_args; | |
} | |
add_filter( 'request', 'fix_request_query_args_for_woocommerce', 1, 1 ); |
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
Github Issue: https://github.com/WordPress/Learn/issues/1873 | |
Prompt: | |
I need your help with translation from english to german. I have the english translation and the german translation. Would you be able to tell me if the german translation is correct? | |
Response: | |
Absolutely, I'd be happy to help with that. Please provide both the English text and the German translation, and I'll review the German version for accuracy and correctness. |
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
# Setup for the Automating WordPress with no code commands | |
# Install npm | |
npm install -g npm@latest | |
# Install n8n with npm | |
npm install n8n -g | |
# Fix Authorization 401 for n8n and localwp WooCommerce REST API | |
# https://www.schakko.de/2020/09/05/fixing-http-401-unauthorized-when-calling-woocommerces-rest-api/ |
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 | |
// Add 16% VAT to vendor commission | |
add_filter( 'wcv_commission_rate', 'my_wcv_commission_rate', 10, 5 ); | |
function my_wcv_commission_rate( $commission, $product_id, $product_price, $order, $qty ) { | |
$vat_fee = 0.16; | |
$marketplace_split = $product_price - $commission; | |
$vat = $marketplace_split * $vat_fee; | |
$commission -= $vat; |
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 | |
/** | |
* Copyright (c) 2016 Ultra Community (http://www.ultracommunity.com) | |
* | |
* Replace this file in invisible-recaptcha/includes/utils/MchIPUtils.php | |
*/ | |
namespace InvisibleReCaptcha\MchLib\Utils; | |
final class MchIPUtils |
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 | |
// Add this to your themes function.php change the values to suit where you want the link to go. | |
// slug needs to be a complete URL. | |
function custom_menu_link( $pages ) { | |
$pages[ 'custom_link' ] = array( | |
'slug' => 'http://yoursite.com/customlink/here', | |
'label' => __('Custom Link', 'wcvendors-pro' ), |
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 change_billing_fields( $fields ){ | |
$fields['billing_postcode']['label'] = ''; | |
$fields['billing_postcode']['placeholder'] = 'Postcode monkey*'; | |
$fields['billing_email']['label'] = ''; | |
$fields['billing_email']['placeholder'] = 'Email*'; | |
$fields['billing_phone']['label'] = ''; | |
$fields['billing_phone']['placeholder'] = 'Phone*'; | |
return $fields; |
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
var somejsfile; |
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 | |
WCVendors_Pro_Form_Helper::select2( array( | |
'post_id' => $object_id, | |
'id' => 'service[]', | |
'label' => __( 'Service Type', 'wc_simple_hosts' ), | |
'wrapper_start' => '<div class=”all-100″>', | |
'wrapper_end' => '</div>', | |
'taxonomy' => 'pa_service', | |
'taxonomy_args' => array( 'hide_empty'=>false ), |
NewerOlder