My English is not good, sorry.
I think the plugin should be such that when the customer selects a date in the date picker as expiration, the system should be defined; Multiply the number of days (from the date selected by the customer to today) by 5 for 5 days delay, multiplied by the defined number, for example 5000 Tomans, and 25000 Tomans for five days delay will be added to the base amount as a penalty.
@joyously thanks.
fixed my problem by this code:
<?php
function link_words( $text ) {
$replace = array();
$cats = get_categories('orderby=name&hide_empty=0');
if ( $cats ) {
foreach ( $cats as $cat) {
$replace[ $cat->name ] = sprintf( '<a href=%s> %s </a>', esc_url( get_term_link($cat) ), esc_html($cat->name) );
}
}
$text = str_replace( array_keys($replace), $replace, $text );
return $text;
}
add_filter( 'the_content', 'link_words' );
?>
Source: WordPress Replace Tag Words in Content with Links