Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
/** START Add New Menu in Account Page from Woocommerce */ /* Add Subscription and Unlocked Posts Endpoint for Account Page from Woocommerce */ function subscription_and_unlocked_posts_new_endpoint() { add_rewrite_endpoint( 'subscription', EP_ROOT | EP_PAGES ); add_rewrite_endpoint( 'unlocked-posts', EP_ROOT | EP_PAGES ); } add_action( 'init', 'subscription_and_unlocked_posts_new_endpoint' ); /* Create Subscription Content in Account Page from Woocommerce */ function subscription_endpoint_content() { include JNEWS_PAYWALL_DIR . 'template/frontend-status-1.php'; } add_action( 'woocommerce_account_subscription_endpoint', 'subscription_endpoint_content' ); /* Create Unlocked Posts Content in Account Page from Woocommerce */ function unlocked_posts_endpoint_content() { include JNEWS_PAYWALL_DIR . 'template/frontend-status-2.php'; } add_action( 'woocommerce_account_unlocked-posts_endpoint', 'unlocked_posts_endpoint_content' ); /* Add Menu Subscription and Unlocked Posts to Account Page from Woocommerce */ function add_subscription_and_unlocked_posts_menu( $menu ) { $item = array( 'subscription' => esc_html__( 'Subscription', 'jnews-paywall' ), 'unlocked-posts' => esc_html__( 'Unlocked Posts', 'jnews-paywall' ), ); $count = count( $menu ); $menu = array_merge( array_slice( $menu, 0, $count - 1 ), $item, array_slice( $menu, $count - 1 ) ); return $menu; } add_filter( 'woocommerce_account_menu_items', 'add_subscription_and_unlocked_posts_menu' ); /** END Add New Menu in Account Page from Woocommerce */
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)