Skip to content

Instantly share code, notes, and snippets.

View fmurdeni's full-sized avatar
🇵🇸
Stand With Palestine

Feri Murdeni fmurdeni

🇵🇸
Stand With Palestine
View GitHub Profile
/**
* paginga - jQuery Pagination Plugin v0.8.1
* https://github.com/mrk-j/paginga
*
* Copyright 2017 Mark and other contributors
* Released under the MIT license
* https://github.com/mrk-j/paginga/blob/master/LICENSE
* This library is already customize by feri@whello.id
* https://www.jqueryscript.net/other/Any-Content-Pagination-Plugin-For-jQuery-paginga.html
*/
@fmurdeni
fmurdeni / functions.php
Created October 19, 2022 08:02 — forked from tripflex/functions.php
Programmatically create a WooCommerce Subscription and associated WooCommerce Order
<?php
public function give_user_subscription( $product, $user_id, $note = '' ){
// First make sure all required functions and classes exist
if( ! function_exists( 'wc_create_order' ) || ! function_exists( 'wcs_create_subscription' ) || ! class_exists( 'WC_Subscriptions_Product' ) ){
return false;
}
$order = wc_create_order( array( 'customer_id' => $user_id ) );
<?php
add_filter('cn_cookie_notice_output', function($output, $options){
//I use text translate because its become constant variable.
$options['message_text'] = __('Website ini menggunakan cookie untuk mendapatkan pengalaman online terbaik anda.', 'murdeni');
$options['see_more_opt']['text'] = __('Ketentuan Privasi', 'murdeni');
// then I use lang to switch the privacy policy page ID
// I use query var for lang