Skip to content

Instantly share code, notes, and snippets.

View tguruslan's full-sized avatar

Ruslan Lopushan tguruslan

  • USPU
  • Ukraine
  • 01:16 (UTC +03:00)
View GitHub Profile
@PechenkiUA
PechenkiUA / functions.php
Created November 30, 2021 09:35
Telsender image products
<?php
/* Telsender image product */
function meta_wc_function_image($list, $order_id)
{
$order = wc_get_order($order_id);
$items = $order->get_items();
$curents = get_woocommerce_currency_symbol();
@PechenkiUA
PechenkiUA / functions.php
Last active September 28, 2023 13:47
Wooccomerce list attribute by product
<?php
function attributes(){
global $product;
$attributes = $product->get_attributes();
if ( ! $attributes ) {
return;
@PechenkiUA
PechenkiUA / Telegram_send.php
Last active September 28, 2023 13:47
modx snipet telegram send formit
<?php
$token = "xxxxxxxxxxxxxxxxxxxx";
$chat_id = "0000000";
$values = $hook->getValues();
#Получаем название формы
$formName = $modx->getOption('formName', $formit->config, 'form-'.$modx->resource->get('id'));
#Получаем ip адрес отправителя
@PechenkiUA
PechenkiUA / opencart.js
Last active September 28, 2023 13:47
summernote basic plugin code
/**
*
* copyright [year] [your Business Name and/or Your Name].
* email: your@email.com
* license: Your chosen license, or link to a license file.
*
*/
(function (factory) {
/* Global define */
if (typeof define === 'function' && define.amd) {
@PechenkiUA
PechenkiUA / cart-shipping.php
Last active September 28, 2023 13:47
shiping method WC change to dropdown
<?php if ( 1 === count( $available_methods ) ) :
$method = current( $available_methods );
echo wp_kses_post( wc_cart_totals_shipping_method_label( $method ) );
?>
<input type="hidden" name="shipping_method[<?php echo esc_attr( $index ); ?>]"
data-index="<?php echo esc_attr( $index ); ?>"
id="shipping_method_<?php echo esc_attr( $index ); ?>"
value="<?php echo esc_attr( $method->id ); ?>" class="shipping_method"/>
@PechenkiUA
PechenkiUA / autoDescription.php
Created February 15, 2022 06:52
Wordpress auto Description
<?php
function autoDescription() {
global $post;
if (!is_singular()) {return; }
elseif(!empty( $post->post_excerpt)) {
echo "<meta name='description' content='$post->post_excerpt' />";
}
else{
$meta = apply_filters('the_content', $post->post_content);
@PechenkiUA
PechenkiUA / functions.php
Created May 2, 2022 08:09
telsender link product
<?php
/* Telsender link product */
function meta_wc_function_link($list, $order_id)
{
$order = wc_get_order($order_id);
$items = $order->get_items();
$curents = get_woocommerce_currency_symbol();
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PechenkiUA
PechenkiUA / functions.php
Last active September 28, 2023 13:47
Telsender UTM Leads Tracker - XLPlugins Woocomerse
<?php
/*
* {utm_source}
* {utm_medium}
* {utm_campaign}
*/
add_filter('tscf_filter_codetemplate', function ($list, $order_id) {
@PechenkiUA
PechenkiUA / Pechenki_hide_order_info_2Line.ocmod.xml
Created July 11, 2022 11:53
Приховати 2 стрічки в інфомації про замовлення
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Pechenki_hide_order_info_2Line</id>
<name>Pechenki_hide_order_info_2Line</name>
<code>Pechenki_hide_order_info_2Line</code>
<version>0.1</version>
<author>Pechenki</author>
<link>https://pechenki.top</link>
<file path="catalog/controller/account/order.php">
<operation>